Instance:children
method#Gives the instances that sit directly inside this one, but not the ones deeper down.
for _, child in door:children() do print(child.display_name) endUse it forgoing through every light in a group, or every part of a door.
An object in your place, such as a part, group, model, spawn, light or NPC, which your scripts find, change and spawn.
You listen to these with :connect, which the Event page covers.
Gives the instances that sit directly inside this one, but not the ones deeper down.
for _, child in door:children() do print(child.display_name) endUse it forgoing through every light in a group, or every part of a door.
Says whether the instance has the tag you ask about.
if part:has_tag("Lava") then print("hot") endUse it forchecking if a touched part is lava or a checkpoint before reacting to it.
tagThe tag.Puts a tag on the instance while the game runs.
part:add_tag("Coin")Use it forturning a part into a token or a kill brick during play, without placing a new one.
tagThe tag, at most 64 characters. An instance has at most 64 tags.Takes one tag off the instance and leaves its other tags alone.
part:remove_tag("Coin")Use it formaking a trap safe once it has been switched off.
tagThe tag.Gives a list of every tag the instance has.
for _, tag in part:tags() do print(tag) endUse it forlisting every tag on a part, for example to print them while debugging.
Smoothly changes a part's position, rotation, color, size or transparency over a set time.
local tween = door:tween({ position = door.position + math3d.vector3.new(0, 10, 0), duration = 2 })Use it forsliding doors, moving platforms, or walls that fade away.
optionsThe target values, how long it takes and the easing.tween callduration · position · rotation · color · size · transparency · 1 moredurationrequiredHow many seconds the tween takes to reach its target values.
positionThe position the instance moves to by the end of the tween.
rotationThe rotation in degrees that the instance turns to by the end of the tween.
colorThe color the instance changes to by the end of the tween.
sizeThe size the part grows or shrinks to, which only works on parts.
transparencyHow see-through the instance becomes, from 0 for fully solid up to 1.
easingHow the change speeds up and slows down: linear, or quad, sine, cubic, quart, expo, back, bounce or elastic followed by _in, _out or _in_out.
Makes a copy of the instance and returns it, placed where you choose.
local copy = door:clone({ position = math3d.vector3.new(10, 0, 0) })Use it forcopying a token, enemy or obstacle to put more of them around the map.
optionsoptionalWhere the copy goes, its group, its Script Name and its audience. The group cannot be inside the instance.clone callposition · rotation · parent · name · audiencepositionWhere the copy is placed in the world.
rotationHow the copy is turned, in degrees on each axis.
parentThe group to put the copy in when it is made.
nameThe Script Name to give the new copy.
audienceThe only players who see the copy, as one Player or a list of them, and without it the copy has the same audience as the original.
Removes the instance, and everything inside it, from the world for good.
part:destroy()Use it forremoving collected tokens, broken walls or spent projectiles.
Says whether the instance is still in the world or has been destroyed.
if part:exists() then part:destroy() endUse it forchecking a part was not already destroyed before your script uses it.
Gives a physics part a sudden push, like a kick or a blast.
part:apply_impulse(math3d.vector3.new(0, 500, 0))Use it forkicking a ball, launch pads, or blasting crates across the room.
impulseThe push: mass times studs per second, within 1e6 on each axis.atoptionalWhere to push, in world space. Nil pushes the centre of mass.Keeps pushing a physics part, and does not stop until clear_forces is called.
part:apply_force(math3d.vector3.new(0, 100, 0))Use it forrockets, hover cars, or wind that keeps pushing objects along.
forceThe force. It stays until clear_forces.atoptionalWhere to push, in world space. Nil pushes the centre of mass.Removes the forces and torques that scripts added to the part.
part:clear_forces()Use it forturning off a rocket's thrust, or making the wind stop.
Keeps turning a physics part, and does not stop until clear_forces is called.
part:apply_torque(math3d.vector3.new(0, 50, 0))Use it forspinning wheels, fans, or platforms that keep turning.
torqueThe turning force. It stays until clear_forces.Gives a physics part a sudden spin, like a flick.
part:apply_angular_impulse(math3d.vector3.new(0, 200, 0))Use it forspinning a thrown object, or knocking a crate into a tumble.
impulseThe spin to add.Gives every instance inside this one, at every level, not only the first.
for _, child in door:descendants() do child.transparency = 0.5 endUse it forfading or recoloring a whole model at once.
Finds a child directly inside by its Explorer name or its Script Name.
local handle = door:find_child("Handle")Use it forgrabbing the handle of a door, or the light inside a lamp.
nameThe name in the Explorer, or the Script Name, of a child.Finds anything inside, however deep, by its Explorer name or Script Name.
local knob = door:find_descendant("Knob")Use it forfinding a part buried deep inside a big model without going through every level.
nameThe name in the Explorer, or the Script Name, of anything under it.Gives the center and size of the box around the instance and everything inside it.
local box = door:bounds()Use it forplacing things on top of a model or measuring its size.
Grows or shrinks the instance, and the spacing of what is inside it along with it.
door:scale_by(2)Use it forpower-ups that make things grow, shrinking puzzles, or giant bosses.
factor2 doubles the size, 0.5 halves it.Puts text on one face of a part or model, in the color and font you choose.
door:set_text("front", "Exit", { color = math3d.color.rgb(255, 255, 255) })Use it forsigns, scoreboards on walls, or labels on buttons.
face"front", "back", "left", "right", "top" or "bottom".textoptionalThe text, cut to 200 characters. Nil or empty removes it.optionsoptionalIts color, font, size and alignment.set_text callcolor · font · size · aligncolorThe color of the text, which is black when you leave it out.
fontThe font the text is drawn in, which is bold when you leave it out.
sizedefault 0The height of each line of text in studs, where 0 makes the text fit the face.
alignHow the lines of text line up across the face of the part.
Gives the text on one face of the part, or nil if there is none.
local sign = door:get_text("front")Use it forreading a sign's current text, such as a counter you add one to.
face"front", "back", "left", "right", "top" or "bottom".