Luau API reference
Generated from the type files Ember ships, the same ones Glowstone Studio checks your scripts against. A script starts from three globals and requires the rest:
local players = require("@ember/players")
players.joined:connect(function(player)
player:send("<yellow>Welcome!")
end)Everything else a script uses, loaded with require. @ember modules are the host, @std kits are Luau built on them, and @pack modules name a host pack's blocks and items.
- @ember/blocksSignals for the experience's custom block types and block tags.
- @ember/commandsChat commands for the players in this instance; players elsewhere never see them.
- @ember/dataData that outlives the instance: each player's document and the experience's leaderboards.
- @ember/effectsParticles, sounds and lightning.
- @ember/entitiesEntities a script spawns.
- @ember/genWorld generation: block ids as numbers, seeded noise, and the bulk writes a generator makes per chunk.
- @ember/instanceThe world instance this script runs in, and its lifecycle.
- @ember/itemsItem stacks to give players and compare against what they hold.
- @ember/playersThe players in this instance.
- @ember/signalScript-made signals behave like host signals: firing queues the handlers for the next script slot.
- @ember/typesThe types the other modules share, such as
PlayerandItemStack. - @ember/uiTitles, the action bar, HUDs and live UI that redraws itself when the values it read change.
- @ember/worldThis instance's world: its blocks, the map's markers and regions, and what players do to blocks.
- @std/cropsCrops that grow on the wall clock, woken once per stage boundary and redrawn as blocks.
- @std/formatNumbers and times as players read them: compact amounts, grouped digits, durations, clocks and countdowns.
- @std/plotPlot frames: positions local to an origin facing north, east, south or west, as minigame-core's PlotFrame.
- @std/roundA waiting room, a countdown, a timed round and a results screen, built on the core modules.
- @std/terrainHeightmap terrain and noise caves the fast way: noise sampled for the whole chunk at once, the ground under the lowest column laid as whole slabs, and every other column run written in one call.
- @pack/minecraftHandles for the blocks and items of the host's
minecraftpack, such asminecraft.blocks.gold_block.id.
Script conventions
The ember host API a running experience script sees.
- Durations are seconds (20 ticks a second); positions are experience-local
Vectors, offset from the host's origin. - An error in a task is reported to the creator console and the script keeps running; more than 100 errors in a minute stops the experience.