This script is supposed to make a gui appear once a boss is defeated, but nothing happens when it dies. I don't get what's wrong, its a simple script.
if game.Workspace.Obama.Humanoid.Health == 0 then script.Parent.Visible = true end
if game:GetService("Workspace"):WaitForChild("Obama").Humanoid.Health < 1 then script.Parent.Visible = true end --[[ The code's firing as soon as you play. but your character is still loading in, above. Im waiting for the character. ]]
That is fired when the script starts running, this is a loop and it will continue running forever(well until the player leaves)
while wait() do if game.Workspace.Obama.Humanoid.Health == 0 then script.Parent.Visible = true end end