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

Is it possible to have a function run when a player respawns?

Does anyone know how to have a function run when a player respawns?

1 answer

The CharacterAdded function. This triggers every time a Character is added. The event can be called from the Player model.

game.Players.LocalPlayer.CharacterAdded:Connect(function() -stuff- end)

or from a server script, as your localscript can reset too when the character respawns:

game.Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function(c)
		--stuff
	end)
end)

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