Any downsides to creating leaderstats before the game runs?

I was experimenting with leaderstats and found out you can create a folder in the StarterPlayer service and it will replicate to every new player that joins the game, meaning you could theoretically use less lines of code, and cut down on “WaitForChild” functions because all of the stats should be loaded the milisecond the player joins the game. Seems like a pretty obvious choice to switch over to this method. It saves lines, and just overall quicker to just make a Folder instance and put values in it instead of typing it all out for each individual value. So, is there any drawbacks to this method im not aware of? Because something about it seems a little too good to be true, considering ive seen nobody else use this method. Everyone seems to make their stats via a script.

Nope, there isn’t any problems. There could be problems with loading saved values if the script ran before the values in the folder loaded. A lot of the times it’s just neater to keep everything in one script, and there may be some underlining downsides but not any that I can think of. If you are worried about stuff like that in general, you can put a premade folder parented to the script and then clone that folder and place it into StarterPlayer, this has the same effect but “seems” a little bit more secure?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.