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

It errors and says: Expected 'then' got '=' Help?

Asked by
roudgy 0
7 years ago

if script.Parent.Parent.Parent.Parent.Character.Humaniod.Health = 100 end

1 answer

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
7 years ago

You misspelled 'Humanoid', you used one = instead of the == that you should use when checking equality, and forgot a 'then'.

if script.Parent.Parent.Parent.Parent.Character.Humanoid.Health == 100 then 
    --// Do stuff
end

Hope this helped.

0
It helped me, thanks :) ROLANBLOX 4 — 5y
Ad

Answer this question