iv tried multiple things but none works, this is what I have so far but I cannot find where the player's health is so it wont trigger if they reset, Please help. Here is the script
function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do child = parent.ChildAdded:wait() if child.Name==childName then return child end end end
function onDied() endgame:GetService("TeleportService"):Teleport(1520637787,game.Players.LocalPlayer) end
Humanoid.Died:connect(onDied)
Please help if you know how
This will kick the player when he died
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() player:Kick("Change this") -- Change this to the kick message. end) end) end)