Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local respawnDelay = 5
- game.Players.CharacterAutoLoads = false
- game.Players.PlayerAdded:connect(function(player)
- player.CharacterAdded:connect(function(character)
- -- find the humanoid, and detect when it dies
- local humanoid = character:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Died:connect(function()
- wait(respawnDelay)
- player:LoadCharacter()
- end)
- end
- end)
- player:LoadCharacter() -- load the character for the first time
- end)
Add Comment
Please, Sign In to add comment