Cloud APIs
LuauExecutionApi
executeLuau

executeLuau

Executes a roblox luau script for a given place.

Parameters

NameTypeDescription
universeIdUniverseIdThe ID of the universe to execute the script under.
placeIdPlaceIdThe ID of the place to execute the script under.
version?VersionThe optional version number of the place to execute the script under.
scriptstring | Buffer | ArrayNonEmptyIfConst<string | Buffer>The script to execute.

Example

const { data: executed } = await LuauExecutionApi.executeLuau({
  universeId: 5795192361,
  placeId: 16866553538,
  script: `local x, y = 3, 4; return x + y`,
}); 

Example Data

{
  path: "universes/5795192361/places/16866553538/versions/26/luau-execution-sessions/67823af7-1f99-4fc5-b3bb-da7ab3456b5d/tasks/67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
  user: "45348281",
  state: "PROCESSING",
  script: "local x, y = 3, 4; return x + y",
  universeId: "5795192361",
  placeId: "16866553538",
  version: 26,
  sessionId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
  taskId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
} 

Endpoint

POST /cloud/v2/universes/{universeId}/places/{placeId}/luau-execution-session-tasks
POST /cloud/v2/universes/{universeId}/places/{placeId}/versions/{version}/luau-execution-session-tasks