Question about .PlayerAdded and .CharacterAdded

Something I’ve wondered is:

if you have a script which looks something like this:

Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
 --SOMEWHERE in here you refer to "plr"
end)
end)

Will the “plr” in the .CharacterAdded even’s function always be referring to the player that is connected to the character in .CharacterAdded for any given user? Because since this is a server script, a new player being added will trigger PlayerAdded and plr will now be a new player. But will that change also cross over into the already-stated function attached .CharacterAdded? Hopefully this made sense.

Ever time a new player joins, it will create a new instance of that function meaning that nothing will overlap. What you have looks good!

5 Likes

Yes? I didn’t understand too much on here, but here is what i know:

.PlayerAdded events, that are connected to an function, will always have its parameter as the player.
.CharacterAdded events, that are connected to an function, will always have its parameter as the character.