Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Problems with using PlayerAdded when solo?

Asked by 6 years ago

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.

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. UgOsMiLy 1074 — 6y
0
Please edit the post which includes the source of the script or the script itself so we can help you better. magicguy78942 238 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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)

Ad

Answer this question