Hungrit Docs

Reference

Look something up

Every verb, every option and every refusal, with what each one is for.

This is the lookup half of the docs. If your question is how do I build a door, the recipes answer that faster, and every recipe links back here for the details.

The nine modules#

A script reaches the world through nine modules. You ask for the ones you need at the top of the file, and that line is the same in every script anyone ever writes.

Luau
local self    = require("self")local world   = require("world")local players = require("players")local events  = require("events")local objects = require("objects")local vec     = require("vec")local json    = require("json")local http    = require("http")local task    = require("task")

Three of them are already there

self, objects and task work with no require at all, because a snippet you paste out of a page has to run. The other six do not: a script that calls world: without requiring it fails on the first line that touches it.

Writing the full list anyway is still the better habit. The require is what gives you autocomplete and red squiggles in VS Code.

Parts of the world#

The biggest parts of world have a page of their own.

Tables and rules#

Long lists you look things up in.


Conventions#

Nine rules hold across the whole API. Read them once and most pages stop holding surprises.

Two answer shapes#

A reading hands you a value and never fails:

Luau
local here = self:position()local n = players:count()

An action hands you true, or something useful, or nil plus a reason in plain words:

Luau
local ok, why = self:move_to(0, 5, 0)if not ok then    print("could not move:", why)end

Nothing throws. A refused call is a value you can look at, so a script never dies halfway through because one line did not work out.

Three meanings of nil#

AnswerWhat it means
a valueit worked
nila real answer meaning nothing: no hit, no such item, nobody here
nil, reasonthe call could not be carried out

world:raycast handing back plain nil is a clear line of sight, not a failure. The second return value is what tells the two apart.

Angles are degrees#

Everywhere, with no exceptions. Zero is the direction the object faces when you place it, and 90 is a quarter turn. The word for an orientation is rot on every verb that takes one.

ease names a curve, smooth counts seconds#

ease is always one of "linear", "in", "out" or "in_out". smooth is always a number of seconds. They are never swapped, and a name that is not on that list is refused rather than guessed at.

Points are interchangeable#

Anything that takes a point accepts a plain { x = , y = , z = } table or a vec, and every reading hands you a vec. You never have to repack a point to pass it somewhere else.

Luau
self:move_to(vec(0, 5, 0))self:move_to({ x = 0, y = 5, z = 0 })self:move_to(0, 5, 0)

Coordinates follow the parent#

An object standing on its own reads and writes world coordinates. An object inside a group reads and writes coordinates local to that group, so moving the group moves everything in it and no script has to know.

Names, not hashes#

Scripts name what an object carries: a sound, a model, an item. No content hash ever appears in a script, which is what lets you swap a sound for a better one without touching a line of code.

The slash decides which shelf it comes from. A bare name lives inside the object and travels with it when the object is copied or sold. A world/ name lives in the world you are standing in.

Luau
self:play_sound("click")        -- carried by this objectself:play_sound("world/bell")   -- stored in this world

Ids, not usernames#

player.id never changes. player.name is a display name the person can edit whenever they like. Save progress under id, always, or somebody renames themselves and loses everything.

Time is seconds#

Every duration in the API is a number of seconds, written as a decimal. 0.25 is a quarter of a second. Nothing anywhere is measured in ticks, frames or milliseconds.

See also#

Updated 17 October 2026