Search the docs
Find a guide, global, type or member
Luau API reference
Generated from the type files Ember ships, the same ones Glowstone Create checks your scripts against.
There in every script, no require needed.
- bignumWhole numbers of up to 400 digits, for currencies that outgrow a Luau number.
- blocksBlock ids for
world. - commandsChat commands for this experience's players.
- dataThe experience's persistent key-value store.
- effectsWorld effects: dropped items, time, weather, lightning, explosions.
- entitiesSpawns entities this script owns.
- eventsSubscribe to built-in events (see
EventName) and to custom events your scripts declare. - ladderPersistent per-player level progressions bought with a ledger.
- ledgerPersistent per-player currencies.
- matchThe running match: its map, mode, players and how to end it.
- playersThe players in this experience's world.
- printWrites to the creator console; arguments are joined with tabs.
- scoreScores kept per objective (
"score"when omitted), for the length of the match. - taskCoroutine scheduling, 20 ticks a second.
- teamsNamed teams of players (at most 64, names 1 to 32 characters).
- uiScreen and world-wide feedback.
- worldBlock access by integer coordinates.
Ember conventions
The ember host API a running experience script sees.
- Text arguments are MiniMessage (
"<red>hi</red>"), at most 4096 characters. - Item arguments are item keys (
"bw:wool","minecraft:stone"); a key without a namespace means this experience's own item if it has one, else the vanilla item. - Durations are seconds (20 ticks a second); distances and coordinates are blocks.
- Inventory and menu slots count from 0, like Minecraft's.
- A Player handle raises once that player has left; an Entity handle raises once the entity is gone.
- An error in a handler or task is reported to the creator console and the script keeps running; more than 100 errors in a minute stops the experience.
Libraries conventions
Persistent data, big numbers, ledgers and ladders. A PlayerRef is a Player handle or a player's uuid string. Callbacks run when the host next ticks, never inside the call that caused them.
Content conventions
Creator content: what content.luau may declare. Keys are bare ("red_wool") or "<experience>:path"; references may also name "minecraft:" keys. "#name" names a tag.