here is the script I tried to use:
if H.Health == 0 then game:GetService("TeleportService"):Teleport(736802287,player) --replace the numbers with your place id end end
but it didn't work
here is the script I tried to use:
if H.Health == 0 then game:GetService("TeleportService"):Teleport(736802287,player) --replace the numbers with your place id end end
but it didn't work
If you put this code in a Local script then it should work. Please note I put mine in the Players StarterCharacterScripts
game.Players.LocalPlayer.Character.Humanoid.HealthChanged:connect(function(Health)
if Health == 0 then
game:GetService("TeleportService"):Teleport(736802287,game.Players.LocalPlayer)
end
end)
Alternatively, another script has been posted on a similar question.
This discussion is preserved as it was. New answers, comments, and votes are closed.