How can one make players instantly re-spawn on death?
Using the Died event of humanoid and the LoadCharacter event of Player. You could do something like this:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.Died:connect(function() player:LoadCharacter() end) end) end)
You can use LoadCharacter to force a player to spawn. If you run this function when the player dies there should be little to no delay in spawn time.
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(charModel) local hum = charModel:WaitForChild('Humanoid', 5) -- should make it safer if hum then hum.Died:Connect(function() plr:LoadCharacter() -- force a player to spawn ie no delay end) end end) end)
I hope this helps.