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

Do you execute LocalScripts from starter player scripts?

Asked by
Il_5x5 10
3 years ago

This is probably really simple but i am beginner and im not really sure

3 answers

Log in to vote
0
Answered by 3 years ago

a local script can be put anywhere where a script can be played (it cant be placed ServerScriptStorage). A LocalScript just makes a script run for the client and not for the server. That is why you use LocalScripts almost always for Gui's because Gui's are mostly personal.

0
false, LocalScript can only be played in StarterGui, StarterPlayerScripts, StarterCharacterScripts, ReplicatedFirst and Backpack. imKirda 4491 — 3y
0
Ty Il_5x5 10 — 3y
0
that is actual nonsense kirda baukeblox12 4 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Local scripts do not only work on starter player scripts, also on UI's and client stuff.

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
3 years ago
Edited 3 years ago

Yes, Roblox devhub says it all on page about LocalScripts.

LocalScripts can only run in:

  • ReplicatedFirst

  • Any tool in Backpack

  • StarterGui / PlayerGui

  • StarterPlayerScripts

  • StarterCharacterScripts (The local character)

Each container is used for their own use, for example StarterGui is often used by less experienced people to make camera script as it updates every time you die which makes it easier to make. I only use one local script in StarterPlayerScripts which runs only once and that's when you join, it then manages everything else. local scripts in ReplicatedFirst are used for loading screens mostly as ReplicatedFirst has function RemoveDefaultLoadingScreen which removes default loading screen quick since scripts inside of it run the first.

Answer this question