Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

expected identifier when parsing expression got 'then'?

Asked by
Glvt102 11
2 years ago

So, im trying to make a gui, that appears after killing a certain enemy for a few seconds. I suck in scripting badly so uh... halp.

if game.Workspace.enemyleader1.Humanoid.Health.Value = < 0 then game.StarterGui.KILLALLENEMIES.Enabled = true wait (2) game.StarterGui.KILLALLENEMIES.Enabled = false end

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

The issue is simple. In the first line, there should be no "=" sign:

if game.Workspace.enemyleader1.Humanoid.Health.Value < 0 then
game.StarterGui.KILLALLENEMIES.Enabled = true wait (2)
game.StarterGui.KILLALLENEMIES.Enabled = false end
0
Oh, i see, thanks! Glvt102 11 — 2y
0
there can be actually, they just did it in the wrong order: "<=" not "=<" mixgingengerina10 223 — 2y
Ad

Answer this question