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

How to fix PlayerAdded not firing?

A simple PlayerAdded script won't fire in a LocalScript or a script

Code:

game.Players.PlayerAdded:Connect(function(Plr)
	Plr.CharacterAdded:Connect(function(Char)
		print("test")
	end)
end)

3 comments

0

It will fire. Are you sure the script is running?

0

The script runs, if you put a print before PlayerAdded then it will print that, but not putting one after PlayerAdded

0

Uhm... The script looks perfectly fine. It will fire "test" once the Player's character has loaded. Shouldn't be any reason for it not to fire/print.

2 answers

If you're trying to wait for a character you can do:

game.Players.PlayerAdded:connect(function(player)
repeat wait() until player.Character
print("test")
end)

2 comments

0

The method he used to wait for a Player's character was proper.

0

Also, use "player.CharacterAdded:Wait()"

PlayerAdded most likely will not fire for the LocalPlayer in testing, but will for everyone else.

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