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

How can I change the PlayerAdded event for when a player respawns?

The Title is explaining, I sometimes see that the PlayerAdded event only works when a Player joins, but doesn't when a Player resets, how can I change it so that I can use the PlayerAdded function but like a GUI or Tool gets added back into the Player's PlayerGui or Backpack on reset?

1 answer

What you are looking for is the CharacterAdded event. Here is a bit of sample code for you:

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		-- What you want to happen when the player respawns.
	end)
end)

2 comments

1

Oh, the CharacterAdded event does that? o_e I didn't know that, thanks for showing me this, its going to become very helpful! :) +1

0

No problem man!

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