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

What are LocalScripts for?

Asked by 8 years ago

Can Anyone please Tell me when and What are the Localscripts For?

0
when and what? what: they are scripts that have to be copied onto every player, via starterplayerscripts, replicated first, and some others. when: when roblox studio was made, or after, but does it really matter WHEN they were made? theCJarmy7 1293 — 8y
0
Do you know what a client and server is in roblox? GoldenPhysics 474 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

A LocalScript is a script that runs on a client that's connected to a Roblox Server. The wiki article really explains it best and this one's pretty easy to understand:

http://wiki.roblox.com/index.php?title=API:Class/LocalScript

Local Scripts will only run if it's in a designated area. It can be inside the Player's CharacterModel, PlayerGui, PlayerScripts, BackPack, or in the ReplicatedFirst service(Replicates the contents to the client first).

They are copied to every player and allow you to control client-side objects such as their camera.

game.Workspace.CurrentCamera

You can also directly get the player:

local player = game.Players.LocalPlayer or

local player = game:GetService("Players").LocalPlayer

0
Oh,Alright! Thank you! Fablemisou 13 — 8y
Ad

Answer this question