Skip to main content

Create a project

loren init my-game

Loren asks which sync tool you want: Rojo, Argon, or None (Studio's built-in Script Sync). Rojo is the default. Then it writes the project, installs the tool and builds the sourcemap. A sourcemap is a file that tells your editor where each script ends up in Studio, so autocomplete works.

To skip the question, pass the tool:

loren init my-game --tool argon
loren init my-game --tool none --yes
OptionWhat it does
--tool rojo, --tool argon, --tool nonePicks the sync tool. none means Studio's Script Sync.
-y, --yesNever asks anything. Without --tool it picks Rojo. It also tells Rokit to skip its trust prompt.
--no-toolsSkips installing the tool and building the sourcemap. Useful offline or in CI. Run rokit install later.

The name becomes a folder in the current directory. It can use letters, digits, spaces, _, - and ., and the folder must not exist yet (an empty folder is fine). If writing the project fails, init removes what it made. If only a later step fails, like the tool install or the sourcemap, the project stays and init exits with 1.

Here's what a Rojo project prints with --no-tools:

(LORENঌ) Creating "my-game" (Rojo)...
(LORENঌ) Types are up to date.
(LORENঌ) Skipped the toolchain install and the sourcemap (--no-tools).
(LORENঌ) Project "my-game" is ready.

Next:
cd my-game
rokit install (installs the sync tool)
loren serve (then connect the Rojo plugin in Studio and press Play)

What you get​

Every project starts with the Loren runtime, a bootstrap script for each side, one example Service and one example Controller. The server bootstrap looks like this:

src/server/Server.server.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Loren = require(ReplicatedStorage.Shared.Loren)

Loren.AddServices(script.Parent.Services)

-- expect() rethrows a failed boot here, so it can never fail silently.
Loren.SetOnFire():expect()

Loren.AddServices registers every ModuleScript in the Services folder. Loren.SetOnFire() starts Loren (the boot). The client bootstrap is the same with AddControllers and the Controllers folder.

Project structure walks through every file and where it lands in Studio.

Connect Studio​

cd my-game
loren serve

loren serve runs rojo serve default.project.json and keeps running until you press Ctrl+C. In Studio, open the Rojo plugin and click Connect. If you don't have the plugin yet, run rojo plugin install once.

Luau-LSP in VS Code rebuilds the sourcemap on its own with Rojo (.vscode/settings.json turns that on).

Press Play​

Press Play in Studio. When everything started, Loren prints one line per side in the Output window:

(LORENঌ) Burning on Server: 1 service, 0 routes, 4 ms
(LORENঌ) Burning on Client: 1 controller, 0 services, 180 ms

"Burning" is Loren's word for "started". The server line counts your Services and routes (a route is one network member: a Client method, a Signal or a ClientEvent). The example Service has none yet, so it's 0. The client line counts Controllers and the Services it can reach. The last number is how long the boot took on your machine, so yours will differ.

If something is wrong, you get one report that lists every problem instead of the line above. Reading the boot report explains it.

Next​

Your first service: add a Service that clients can call, and a Controller that calls it.