roblox

Built-in library for manipulating Roblox place & model files

Example usage

local roblox = require("@lune/roblox")

-- Reading & writing a place file
local game = roblox.readPlaceFile("myPlaceFile.rbxl")
local workspace = game:GetService("Workspace")

for _, child in workspace:GetChildren() do
    print("Found child " .. child.Name .. " of class " .. child.ClassName)
end

roblox.writePlaceFile("myPlaceFile.rbxl", game)

Functions

getAuthCookie

function Roblox.getAuthCookie(raw: boolean?)

Gets the current auth cookie, for usage with Roblox web APIs.

Note that this auth cookie is formatted for use as a "Cookie" header, and that it contains restrictions so that it may only be used for official Roblox endpoints. To get the raw cookie value without any additional formatting, you can pass true as the first and only parameter.

Example usage:

readModelFile

Reads a model file into a table of instances.

Example usage:

readPlaceFile

Reads a place file into a DataModel instance.

Example usage:

writeModelFile

Writes one or more instances to a model file.

Example usage:

writePlaceFile

Writes a DataModel instance to a place file.

Example usage:


Types

Instance

Last updated