I tried this part of a script: if game.Players.LocalPlayer.Character.Humanoid.Health == 1 then
The script is called HealthCheck.
And it gave me the error: Players.(username).PlayerScripts.HealthCheck:1: attempt to index nil with 'Humanoid'
Perhaps the character hasn't loaded in yet, maybe wrap it in a CharacterAdded() function then do :WaitForChild("Humanoid")
Try doing
if game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health == 1 then
Normally the player isn't Humanoid until they load in, so you need the :WaitForChild("Humanoid"). Hope this helped
Again. Players.(player).PlayerScripts.HealthCheck:1: attempt to index nil with 'WaitForChild' Edit: now there's no error, but it won't work.