Skip to content

Home

Welcome

Welcome to the Lua documentation for worldtobuild.com! Here you can find information on all things about Lua in World to Build.

World to Build uses Lua 5.4, the reference for Lua 5.4 can be found here. World to Build's custom Lua engine, bLua, also has some additional helper macros such as wait() and print(). Learn more about Macros on the Macros page. World to Build calls your custom Lua through Events like Begin() and Tick(). Learn more about Events on the Events page.

function Begin()
    print("Hello World to Build!")
    wait(3)
    print("Keep exploring the docs to learn more about Lua.")
end

Looking for something specific? Try using the search bar in the top right.


Script Editor

Hey there! In this mini tutorial we'll go over how to get started using the script editor in World to Build.

Building your World

Our first step is to enter Build mode on the World to want to start scripting.

Go to worldtobuild.com and log in.

Then, on the navigation bar at the top of the website, click My Stuff, then My Worlds. Here you can click Build this world on any worlds that you have, or you can click Create World to create a new world.

You should now be in Build mode on a World of your choosing.

Open the Script Editor

At the top of your screen in Build mode, you can see a button for Script Editor, go ahead and click it to attempt to open a script editor.

World to Build uses accessible Lua files so that users can use any script editor they want. If you haven't set up a script editor yet, now is the time when we will do so.

VSCode

VSCode is a free application that you can use to edit World to Build Lua files. World to Build has intellisense support for VSCode via an extension that is shipped with the client.

You can download VSCode by clicking here!

To activate the VSCode extension fully, click File > Preferences > Color Theme and select bLua.