Local Scripts
Local Scripts are scripts that replicate to a client and not the server. A LocalScript will only run Lua code if it is a descendant of one of the following objects:
A Player’s
character
modelA Player’s
PlayerGui
A Player’s
PlayerScripts
.The
ReplicatedFirst
service
For example: If we had a local script that if you press the space key a part would delete. When a player presses the space key and the part deletes, that is only on their screen. The server and other clients who have not pressed that key yet will still see the part.
Last updated