Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make the respawn faster?

Do you know how to make the respawn faster?

3 answers

✓ Accepted answer

To do this, you will need to disable automatic respawning. This is easily done by setting the property of the Players service CharacterAutoLoads to false.

After that you need to write a function that will handle character respawning for each player that enters the game. We can use the PlayerAdded event to get each player. To actually load the character, we can use the function of player LoadCharacter. Using the Died event of humanoid we can detect when the player needs to be respawned. This event should be connected each time the player spawns so we will have to use the CharacterAdded event. When the Died event fires, we will simply wait a specific amount of time and call the LoadCharacter function again.

local respawnDelay = 5
 
game.Players.CharacterAutoLoads = false
 
game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.Died:connect(function()
				wait(respawnDelay)
				player:LoadCharacter()
			end)
		end
	end)
	player:LoadCharacter()
end)

3 comments

0

Thanks

0

You're welcome :)

0

I accept your answer

There is now a Players.RespawnTime property, so now you don't need a script to do this. Just go in the Explorer, select the Players service and set the RespawnTime property to how many seconds you want in the Properties menu.

This discussion is preserved as it was. New answers, comments, and votes are closed.