So I have a script. If the person is on fire, they lose health, then die. But the output says 20:08:59.458 - Workspace.Script:1: 'then' expected near '='. Why?
if Effects.Fire = true then wait(5) game.Workspace.USERNAME.Humanoid.Health = 5 wait(4) game.Workspace.USERNAME.Humanoid:Destroy() end
When comparing two things, you use the == operator. Compare two statements like this:
if Effects.Fire == true then
if Effects.Fire == true then wait(5) game.Workspace.USERNAME.Humanoid.Health = 5 wait(4) game.Workspace.USERNAME.Humanoid:Destroy() end
You need the "==" because your comparing. In other situations you might need a "~="
if (humanoid ~= nil) then
I used the "()" in it. You don't have to.