Fandom

ROBLOX Wikia

Script

Redirected from Scripting

12,016pages on
this wiki
Add New Page
Comments11 Share
Script example

Looking at the source of a script through a built in text-editor from Roblox Studio

A script is a base-class instance that holds a section of the game. It is coded in the Lua language. Upon execution, scripts will normally run automatically and has access to the server events and properties. Scripts have the ability to run inside the ExplorerImageIndex 19Workspace, or ExplorerImageIndex 71ServerScriptService.

Scripts are a fundamental element to the Studio and it is at the core of game creations. All games run through multiple scripts that are simultaneously threaded, enabling developers to run other objects over the top of scripts.

NewScriptIcon

New ROBLOX Script Icon

Features of a script

A script has an infinite amount of lines that it can hold at a given time. Each line's indentation is pre-determined by its previous lines. For example if the previous line consists of a function, RBX.lua will be able to indent the next line, so that the formatting of such scripts would appear readable upon reboot. In turn, the script will add an "end" statement in the next line.

Properties of a script

  • Disabled determines whether or not the script will run.
  • LinkedSource is used to store a URL that points to an online script source.
  • CurrentEditor returns the player who is currently editing the script.

Types of scripts

Server scripts

As the name implies, server scripts deal with server-sided events, such as the leaderboard. Server scripts can only access server-sided events and properties. That is, the server script cannot access the player's GUI, as well as the client itself. However, they may be able to communicate with local scripts in order to manipulate the player if necessary. This is done through remote events and remote functions. Server scripts can only access the Workspace and the ServerScriptService.

Local scripts

Main article: Class:LocalScript

Local scripts works on the backend data. That is, local scripts have the ability to manipulate the player, as well as access the client events and properties. As such, local scripts are mainly used when dealing with the player property, such as the ExplorerImageIndex 5Camera. However, they may be able to communicate with server scripts in order to access the server events through the communication of remote events and remote functions. Local scripts can only access the player's gui, as well as the backpack.

Module scripts

Main article: Class:ModuleScript

Further reading

See also

Start a Discussion Discussions about Script

  • Scripting

    • '''How many scripters are in this wiki? (begginer's and nonbegginers.)'''
  • Scripting Lava Jumps

    5 messages
    • right click on what you are puting it in. click insert object. click script. click on the script you inserted. copy and paste the script.
    • this is the first time i found real script. I always find scripts but there fack!

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.