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

Players.Regnaltsz.PlayerGui.ScreenGui.Script:4: attempt to compare userdata with number?

Asked by 6 years ago

I think my gui is fine but it isnt working!

print("DeathScreen loaded")
player = game.Players.LocalPlayer
character = player.Character

if character.Humanoid <1 then
    print("Player is dead.")
    script.Parent.Frame.Visible = true
    script.Parent.Text.Visible = true
        script.Parent.Static:Play()
        print("Static is playing.")
    end
0
character.Humanoid is the instance which cannot be compared to a number. Use the humanoid health changed event http://wiki.roblox.com/index.php?title=API:Class/Humanoid/HealthChanged User#5423 17 — 6y

Answer this question