I'm trying to make a part of my game where when you die 3 times, you respawn at the start of the first level again. The only issue is, the Humaniod.Dead wont work, I can't seem to detect when the player dies, or when their health is zero. I have tried multiple sources, and this is all I can seem to come up with.
if Character.Humanoid.Health.Value <= 0 then -- if the players health is less than 0... print("Checking for health") workspace.Lives.Value = workspace.Lives.Value - 1 --Changes the lives left script.Parent.Text = "Lives: " .. workspace.Lives.Value --Changes the GUI to display accurate health status end
I am relatively new to scripting in Roblox, so please ignore the poor scripting, and any obvious errors.
