I am making a GUI which displays "lives: 3" I want this number to deplete every time the player dies, and either kick or teleport the player somewhere else.
PS- I don't what the code looks like I just want it to work.... I've working on this for days...
this is my code so far from code I have salvaged
local hum = nil
local Lives = script.Parent.Lives
repeat
wait()
hum = script.Parent:FindFirstChild("Humanoid")
until hum ~= nil
hum.Died:connect(function()
Lives.Text = ("lives: 2")
end)
If you guys could tell me how to fix this or a better way to do this that would be great!

1 comment
Cool