What is the difference between a script and a local script?

So there is a local script and a script. But I just don’t know what is the difference between them. When do you use a local script instead of a regular script?

7 Likes

Script runs on server, local runs on client, and module can run for both.

13 Likes

Local script’s deal with the client, or the player.
Script’s (Real name server script’s) deal with the server.

Locals script’s are used for player specific event’s, that only that certain player can see and interact with. While server script’s do event’s in the server. Which every player can see and interact with.

Also there is a third type of script, known as the Module script. Basically it’s like a server script, but it’s used to store information in a table, and can used as a “repeat” script

8 Likes

local script fires the script through client so the server wouldn’t know what happen because it only happen to the client

script “normal script” fires the script to the server. meaning it will create changes to everyone’s vision. If you use this for GUI, the players won’t know the changes but the server does.

module script (Bonus) is used to collect variables as functions and other storages.

core script(Another Bonus) this script can be only accessed by roblox official staff. This script is used to do anything that a normal player cant (i have no clue why i put this here :man_shrugging: )

14 Likes

This has already been answered in the past.

A client is a player, and so LocalScripts, which can only be accessed by StarterPlayerScripts, StarterCharatcerScripts, ReplicatedFirst, StarterGui (Any sort of UI), and StarterPack. LocalScripts only affect one user, say you kill a player on a local script, for the user the local script is assigned to, the player is dead, but on the player’s side, they’re still alive and can walk around.

A server script (Script) can access the server, meaning they can affect everyone, say you kill someone through a server script, to everyone they are dead until they respawn. Hope this helps!

3 Likes