We Value Your Privacy

We and our partners use technology such as cookies on our site to personalise content and ads, provide social media features, and analyse our traffic. Click below to consent to the use of this technology across the web. You can change your mind and change your consent choices at anytime by returning to this site.

Update Consent
Loading ...

How to Code in Roblox

Updated April 17, 2017

Roblox is an online gaming site designed for kids where players create and customise their own worlds using building blocks. You can code scripts in Roblox to have your character perform automated sequences of actions such as outputting text, moving your arms around and even having your head fall off. You can use the Roblox Studio to add your own custom scripts to the game, which use the Roblox Lua scripting language.

Loading ...
  1. Open Roblox Studio by clicking the Windows "Start" button, click "All Programs", click "ROBLOX" and click "Roblox Studio." Make sure you are in "Edit" mode in Roblox Studio by clicking your profile name and clicking "Edit."

  2. Add a new script to Roblox Studio by clicking "Insert", click "Object", click "Script" and click "Ok." This creates a blank new script in the "Workspace." If the "Workspace" isn't visible, click "View" and click "Explorer."

  3. Double-click the script's name in the "Explorer" window. This opens the script in a text editor.

  4. Add the Lua code you want your script to execute in Roblox. For example, you can print text by adding the following code:

  5. print ("Text here!")

  6. A more complicated example removes your character's head with the following code:

  7. game.Workspace.MyNameHere.Head:remove()

  8. Replace "MyNameHere" with the name of your Roblox character. Save the file when you are finished adding code.

  9. Execute your script by selecting the script in the "Explorer" window and changing the "Disabled" property in the "Properties Window" to "false."

Loading ...

About the Author

Sean Mann has been a freelance writer since 2010. With thorough knowledge and experience in technological fields such as computer software, hardware, the internet and programming, he creates online content for various websites. Mann has a Bachelor of Science in computer science from Ohio State University.

Loading ...