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

What's the difference between a script and a local script?

Asked by 6 years ago

I really don't understand the difference between a local script and a normal script?

2 answers

Log in to vote
-1
Answered by 6 years ago

Script is used in parts and other stuff, basically everywhere you want to. Local scripts are to LOCAL players. So they are placed ANYWHERE in a PLAYER! In the local script you can do:

local player = game.Players.LocalPlayer

But in a normal script you can't. :)

0
oh thx Lukas4306 4 — 6y
0
You can accept the question so both get reputation. (Down below) wilsonsilva007 373 — 6y
0
Thx Lukas4306 4 — 6y
0
Ok another thing is what is the word or function idk used for while coding?Like you put Local player and you can use local with others sorry I['m not that good at scripting Lukas4306 4 — 6y
0
It's good to note that for FE, to be able to do certain stuff, you have to communicate through the server via remot functions/events. (Creating a new part in the Workspace, for example) TheeDeathCaster 2368 — 6y
Ad
Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

A script will execute on the server and has access only to server-side events and properties. If Filtering Enable is on you will have to use the regular script for server side stuff. Even Filtering Enable affects these scripts.

A local script is for client only, so they have access with client-only objects, like the player's camera and opening or closing a GUI. It can also have a property that is from Players Service that return the player who is using the script. These scripts are bit more easier to script and take stress off the server. If you do create a sound instance with these with FE on it will only make it a thing for the player.

List of Local Script Can Effect: Tool for a player, Character Model, Player GUI, Player Scripts, Camera Control, Custom Controls.

Hope This Help

Answer this question