In order to start using roblox-ts, you’ll need to have the following installed:
- A code editor. We recommend VSCode.
- Rojo 0.5.x. The easiest way to install it is through the Rojo VSCode plugin. If you install Rojo via the plugin, make sure in your settings (
Ctrl + ,) the “Rojo: Release Type” is set to “pre-release” to get the latest
Once NodeJS is installed, you can install roblox-ts from the command line with:
npm install -g roblox-ts
The following is a reference for how to use the roblox-ts command line interface. This can be displayed by
Usage: rbxtsc [options] Options: -w, --watch enable watch mode [boolean] -p, --project project path [default: "."] --noInclude do not copy runtime files [boolean] [default: false] -i, --includePath folder to copy runtime files to [default: "include"] --minify, --min minify emitted Lua code [boolean] [default: false] --onSuccess Command to run on watch success [default: ""] --rojo, -r Manually select Rojo configuration file [default: ""] --init [string] [choices: "game", "model", "plugin", "package"] -v, --version show version information [boolean] -h, --help show help information [boolean]
To start using roblox-ts to create a game project, follow these steps:
1. Create a new folder and name it whatever you’d like. We are going to name ours
2. Open a terminal with the working directory set to your created folder. VSCode automatically does this when you
Open with Code and press
Ctrl + ` in VSCode to open the terminal window.
rbxtsc --init game inside your empty folder. This will create the required files to get you started:
4. Start roblox-ts in watch mode via
rbxtsc -w. You can exit watch mode later by clicking on the console and pressing
Ctrl+C on your keyboard.
5. Next, start up a Rojo server. If you are using the Rojo plugin, simply hit
Ctrl + Shift + P and select “Start Server”
Otherwise, open a new terminal with the same working directory and start Rojo via
rojo serve. In VSCode a new terminal can be opened by pressing the
6. Open a place in Studio you wish to sync your code to. Open up the Rojo plugin in Studio and hit
7. Write code!