In order to start using roblox-ts, you'll need to have the following software already installed:
- NodeJS 14+
- A code editor. We recommend VSCode.
- Rojo 6+. The easiest way to install it is through the Rojo VSCode plugin.
Once you have NodeJS properly installed, it should come with an
npm command for your command line.
To install the latest version of roblox-ts, simply run:
This command will install roblox-ts globally on your system. You can now use
rbxtsc in your command line.
To start using roblox-ts to create a game project, follow these steps:
- Create a new folder and give it a name. The folder name cannot contain spaces. We are going to name ours
- Open the folder using your code editor (or your command line if your code editor does not have one integrated).
rbxtsc init gamein your command line to start the interactive project setup.
If you're using PowerShell for the first time, you may get an error about "running scripts is disabled on this system". You can fix this by running the following in PowerShell as an administrator:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Start roblox-ts in watch mode via
rbxtsc -w. You can exit watch mode later by clicking on the command line and pressing
Ctrl+Con your keyboard.
- Next, start up a Rojo server. If you are using the Rojo VSCode extension, simply hit
Rojo: 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
- Open a new place in Roblox Studio where you wish to sync your compiled code into. Open up the Rojo plugin in Studio and hit
- Write code! 🎉