Object properties#
Every key self:set accepts, and what each one does. This is the same vocabulary as the Edit window. Anything you can tick there, a script can write.
Use it to
- look up every key
self:setaccepts - change colour, surface, light, fog, physics, health or outline
- store fields of your own on an object
self:set({ color = "#55e38b", emissive = 1.5, light = true, light_radius = 12,})One call is one change, however many keys it carries, so batch them. Up to 32 keys per call.
Reading is one key at a time:
local d = self:get("dynamic")A key that was never written reads as nil, which means the engine's default It is not zero, and it is not false.
Appearance#
| Key | Type | Meaning |
|---|---|---|
color | colour | the base colour |
transparency | 0 to 1 | 0 is solid, 1 is invisible |
metallic | 0 to 1 | how metal-like the surface is |
roughness | 0 to 1 | 0 is a mirror, 1 is chalk |
emissive | number | how much light it gives off itself. Above 0 it glows |
uv_repeat | {u, v} | how many times the texture tiles across the surface |
Colours#
"#55e38b" -- what every colour picker gives you"#55e38baa" -- with transparency{ r = 0.3, g = 0.9, b = 0.5 }Painting one face#
A shape's faces can be painted individually:
self:set({ ["f0.color"] = "#ffffff", ["f1.transparency"] = 0.5,})| Shape | Face numbers |
|---|---|
| box | 0 top, 1 front, 2 right, 3 back, 4 left, 5 bottom |
| cylinder, sphere | 0 top, 1 side, 2 bottom |
A face with no override follows the object's own colour and transparency.
Light#
An object can be a lamp.
| Key | Type | Meaning |
|---|---|---|
light | boolean | turns the light on. Absent = off |
light_color | colour | |
light_radius | 0 to 96 | how far it reaches, in metres. Absent = 8 |
light_intensity | 0 to 10 | brightness multiplier. Absent = 1 |
light_falloff | 0 to 2 | how quickly it fades to its limit. Absent = 1 |
light_cone | 0 to 90 | 0 lights every direction; above 0 makes a spotlight of that half-angle |
light_shadow | boolean | asks for a real shadow. Needs spare graphics budget |
Tip
emissive and light are different things. emissive makes the object look bright; light makes it illuminate the things around it. A glowing sign wants the first. A lamp wants both.
Shadow and interiors#
| Key | Type | Meaning |
|---|---|---|
cast_shadow | boolean | does it cast one? |
receive_shadow | boolean | do shadows land on it? |
block_sky_light | boolean | does it count as a roof, keeping sky light out? |
receive_indoor_darkness | boolean | does it darken when it is under a roof? |
interior_darkness | number | how dark it goes indoors |
Fog#
Any object can be filled with fog. Its box is the fog: inside it the air is hazy, and where sunlight comes through gaps (between leaves, through a window) you see the beams. Outside the box the air stays clear.
The usual way is an invisible box (transparency 100%) scaled over a forest, a cave or a hall, with Fog ticked in the inspector's Lighting section.
| Key | Type | Meaning |
|---|---|---|
fog | boolean | fills the box with fog. Absent = off |
fog_clarity | 2 to 500 | how far you can see through it, in metres. Absent = 80 |
fog_color | colour | the colour of the light it scatters. Absent = a cool white |
fog_glow | 0 to 3 | how strongly it catches the sun, which is what makes the beams. Absent = 1 |
fog_edge | 0 to 20 | how many metres it takes to fade in at the box's sides. Absent = 2 |
fog_wisps | 0 to 1 | 0 is even haze; 1 is patchy wisps that drift. Absent = 0.4 |
Tip
Beams need gaps. Fog in open sunlight just glows; fog under a roof with no openings stays dark. The beams appear where the light is broken up: a canopy with holes, a window, the slats of a barn.
Fog costs nothing while no fog box is in view. Players on low-end machines see it at a lower resolution, and anyone can switch the beams off in their graphics settings.
Physics#
| Key | Type | Meaning |
|---|---|---|
collide | boolean | do players bump into it? Absent = true |
dynamic | boolean | is it a physics body? Absent = false |
mass | number | what it weighs, in kilograms |
drag | 0 to 8 | how much the region's wind gets hold of it. Absent = 1 |
carry | boolean | may it be picked up? |
self:set({ collide = false }) is how a door opens without moving.
dynamic = true makes an object fall, settle and be shoved. It is always solid, so it overrides collide = false. Both read back as true or false, never nil.
mass and drag#
Both only mean anything while dynamic is on.
mass is a crate at 30, a person at 70, a car at 1500. It decides who the region's wind can move and how two bodies shove each other. It does not change how fast something falls, and self:push stays deliberately mass-independent.
drag is a box at 1, a ball at about 0.5, a banner at 3 or more. drag = 0 is the opt-out: the weather never moves this object.
Tip
Weight alone does not decide who blows away. The acceleration the air gives is its force over the mass, and the force carries the object's area. That is why a five-kilo lead ball ignores a gale that carries a two-hundred-gram sheet across a field.
Health#
| Key | Type | Meaning |
|---|---|---|
max_health | number | what it counts down from |
health | number | what it has left |
Setting max_health is what makes an object destructible. Without it, damage and heal refuse with "this object has no max_health", and that is how a world says which props are breakable and which are scenery.
health is writable because starting a tree at forty out of a hundred is the creator's decision, not a thing the engine should guess.
Outline#
The "this one" mark, a rim drawn around the object.
| Key | Type | Meaning |
|---|---|---|
outline | boolean | turn it on |
outline_color | colour | |
outline_width | number | |
outline_effect | string | how it is drawn |
Tip
An outline is a property of the object, not an effect on somebody's screen. That means one pass draws it for the editor and for scripts alike, and an object that is marked is marked for everyone who can see it.
Read-only#
These exist on an object but a script cannot write them. Writing one answers nil, "read-only key" rather than quietly creating a field that does nothing.
shape · texture · material · script · particles · predict · bounds_min · bounds_max · part · owner · origin
particles is written only by self:particles.
Your own fields#
Any key that is not on the lists above is yours. Write whatever you like:
self:set({ open = true, mode = "stopped", visits = 12 })These are what a predict rule tests with when, and what a HUD condition reads. They are how an object describes its own state in a way the engine can act on without waiting for your script.
They are not the same as self.store: properties are part of the object and replicate to everyone who can see it; the store is private memory that only your script reads.
See also#
Updated 17 October 2026