This is probably really simple but i am beginner and im not really sure
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.
Local scripts do not only work on starter player scripts, also on UI's and client stuff.
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.