I have a promblem in my game and need to call a function (or however you say) when a character respawns. If there is a way, then you, who give me an answer, can just print something when a character respawns. Then I can change what happens myself, I just want to learn how to make the function. Thank you!
✓ ANSWER ACCEPTED
How do I make a function when a character respawns?
1 answer
✓ Accepted answer
Use the Player.CharacterAdded signal, which is fired every time the Player's character spawns. The character model is passed to any listeners:
local playersService = game:GetService("Players")
playersService.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(print)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
"Use the Player.CharacterAdded signal" ? This is called an event.
It is an RBXScriptSignal, not an event >:(