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

Problems with using PlayerAdded when solo?

From one source, it says that there can be an issue with using playerAdded when testing your scripts solo in the Studio. However, i do not understand at all what it means by

''This event may not work as expected in solo mode, because the player is created before scripts that connect to PlayerAdded run. To handle this case, as well as cases in which the script is added into the game after a player enters, create an OnPlayerAdded function that you can call to handle a player's entrance''

I am not english, and this exact wording confuses me, could somebody re-word it to simpler terms? Thanks.

2 comments

0

When testing with Solo mode in Studio, the player is added before the scripts. PlayerAdded fires when a player is added to the game, but by the time the script starts running, the player has already been put in the game. But don't worry; this will not affect the way your game works online, when people actually play it.

0

Please edit the post which includes the source of the script or the script itself so we can help you better.

1 answer

✓ Accepted answer

the PlayerAdded will work online, but like @UgOsMiLy said it adds the player then the script, so to test your script create a local test server.(located on the test tab)

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