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

Where Should I put my scripts? In other words, where is the best place to store game scripts??

Asked by 6 years ago

I am really confused on the best place to put my scripts. Please help me with this problem. Also where do you keep your scripts? Honestly I don't have a problem I am just curious, I am writing this part now because it wants me to put more sooo...

0
If the client needs to access them, then `StarterCharacterScript` or `StarterPlayerScript`. If the client does not need to access them, the best place is `ServerScriptStorage` Axceed_Xlr 380 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Scripts can go anywhere you want them to be, the best place to put it if you want your things more organised is to put it in ServerScriptService. It's a place to put the scripts (only if you want to) and you have access to more things with the place. (your game's server) It's optional, but it's a good way to organised or if you have a script that reaches to other things and places.

Ad
Log in to vote
0
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago

Script objects (scripts that run on the server) should all go into game.ServerScriptService, the proper container for them.

LocalScript objects (scripts that run on the client) should generally go into game.StarterPlayer.StarterPlayerScripts, unless you have a reason to put it elsewhere.

ModuleScript objects should go into game.ReplicatedStorage if the client and server both need to require it, game.ServerStorage or game.ServerScriptService if only the server needs to require it, or game.StarterPlayer.StarterPlayerScripts or game.ReplicatedStorage if only the client needs to require it.

Answer this question