Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

2 answers

✓ Accepted answer

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. :)

5 comments

0

oh thx

0

You can accept the question so both get reputation. (Down below)

0

Thx

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

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)

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

This discussion is preserved as it was. New answers, comments, and votes are closed.