hi, im trying to make a lives system in my game but i dont know how to do it. the starting text is 'Lives: 4' and then when the player dies it will change to 'Lives: 3' then 'Lives: 2' and so on. but then after 'Lives: 1' it changes back to 'Lives: 4' and resets their curreny (stage) and teleports them to the start co ordinate (-27, 5.7, 53)
here is the script i tried:
if StarterGui.Lives.TextBox.Text = "Lives: 4" and ("Humanoid").Health = 0 then do
StarterGui.Lives.TextBox.Text = "Lives: 3"
if StarterGui.Lives.TextBox.Text = "Lives: 3" and ("Humanoid").Health = 0 then do
StarterGui.Lives.TextBox.Text = "Lives: 2"
if StarterGui.Lives.TextBox.Text = "Lives: 2" and ("Humanoid").Health = 0 then do
StarterGui.Lives.TextBox.Text = "Lives: 1"
if StarterGui.Lives.TextBox.Text = "Lives: 1" and ("Humanoid").Health = 0 then do
StarterGui.Lives.TextBox.Text = "Game Over..."
wait (3) then
Humanoid.Torso.Position = (-27, 5.7, 53)
StarterGui.Lives.TextBox.Text = "Lives: 4"
end)
this is a normal script (not local) in the Lives GUI in StarterGui
thanks in advance, from poopypigeon245

2 comments
what should i write instead of the green text and where do i insert the script? (right now its in the lives gui)
Sorry I've given you enough to solve it out on your own. I'm not writing your scripts for you. But I will help you.