

Create our virtual tree describing a full-screen text label. Local Roact = require(ReplicatedStorage.Roact) Then you can use the require keyword to access the contents of the library.įor example, if you were using Roblox's React-like framework, Roact, you could use it in your LocalScripts like this : local ReplicatedStorage = game:GetService("ReplicatedStorage") By default, it will land in the Workspace, but you can move it to ReplicatedStorage or ServerStorage or wherever you are organizing your code. rbxm, you can simply drag and drop it into your place file in Roblox Studio. It will also convert directories into Folders.Īlso, if a directory has an a file, instead of creating a Folder, it will create a ModuleScript with the contents of that file as its source. Then use the rojo build command to package it all up C:\> cd git\REPOSITORY_NAME\srcĬ:\git\REPOSITORY_NAME\src> rojo build -output REPOSITORY_NAME.rbxm

So open up a terminal and navigate into the source folder. Now that you have the raw lua files, we can package them up into a format that can be easily imported into Roblox Studio. I personally don't recommend Luarocks, it is really annoying to get working on a Windows system, and the latest version expects at least lua version 5.4, and Roblox runs on a forked version of lua 5.1. Anyways, you can clone the git repository to get a local copy of it, or use Luarocks. In order for the library to work in Roblox, it must use code that will run in a Roblox environment, so anything that tries to access the filesystem will likely not work. Then to download rojo, follow the installation guide or simply use the command : cargo install rojo It comes with a package manager, cargo, and we'll use that to download the commandline version of rojo. Rojo is a tool written in rust, so the easiest way to get it is to also install rust. So here's the pipeline to get your code into Roblox Studio. rbxm (Roblox Model) file, which can be dragged and dropped into an open place in Roblox Studio. Among its features is the ability to take a library of lua code and convert it to a.

The best tool I have found for taking lua libraries and making it available in Roblox Studio is Rojo, by LPGHatguy. These things are inaccessible in Roblox Studio, so as a warning, this answer will not work if you are trying to use a library that is not pure lua. Lua-cURL requires a C compiler and a system installation of the cURL library. I was unable to get this to work with Lua-cURL for a few different reasons. As a disclaimer, this answer is how to generally use libraries in Roblox Studio.
