Incomplete statement: expected assignment or a function callin Roblox Luau: what it means and how to fix it

What it means

A line works out a value and then does nothing with it. Every Luau statement has to either store a value with = or call a function.

The smallest script that triggers it

Triggers the errorline 2: error here
local score = 0
score + 1

The fix

Fixedline 2: the fix
local score = 0
score = score + 1

score + 1 only calculates a number. Writing score = score + 1 (or score += 1) stores the result.

Common causes

  1. A calculation was written without assigning the result.
  2. == was typed where = was meant, so the line compares and never assigns.
  3. A property or variable name sits alone on a line, often a half-finished edit.

Practice this until it sticks

A Deep Dive on statements, assignment and operators: 5-minute lessons, each with a quiz. What you miss comes back in the next module. One Deep Dive a day is free. No card.