Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

expected identifier when parsing expression got 'then'?

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

✓ Accepted answer

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

2 comments

0

Oh, i see, thanks!

0

there can be actually, they just did it in the wrong order: "<=" not "=<"

This discussion is preserved as it was. New answers, comments, and votes are closed.