Classes
Every class a world can hold, with its members. Make one with new("ClassName", parent) or KHIM Engine's Insert Object. Roblox's PascalCase names for the same members also work.
Every object
| Member | |
|---|---|
name, className, parent | |
find(name), waitFor(name, timeout?), findByClass(className), children(), isA(className) | Finding |
clone(), destroy(), destroyAfter(seconds) | |
tween(goals, time or options) | Parts, UI, Lighting, the camera |
addTag, removeTag, hasTag, getTags | Tags |
setAttribute, getAttribute, getAttributes, attributes, attributeChanged, getAttributeChangedSignal(name) | Attributes |
Parts
Part
position, rotation, transform, size, color, transparency, anchored, canCollide, shape, material, velocity, group, mesh, texture (read-only); touched(part), touchEnded(part); applyImpulse(force), loadAnimation(animation) (a rig).
Spawn - a Part players appear on. MeshPart - a Part showing a 3D model (mesh).
Model, Folder
Groups. A Model moves and copies as one; new("Model") makes one. A Folder keeps things tidy.
Players
Player
name, displayName, userId, team, neutral, position, health, maxHealth, walkSpeed, jumpPower, stats, backpack, character, gui, characterModel; died; teleport(position), damage(amount), kick(reason?), equipTool(tool), unequipTools().
Character
body (a Body), root (a RootPart); moveTo(position), pivotTo(transform).
Body
health, maxHealth, walkSpeed, jumpPower, sitting, state; died, stateChanged(new, old); damage(amount), loadAnimation(animation), getPlayingAnimationTracks(); idleAnimation, walkAnimation, jumpAnimation, fallAnimation, climbAnimation.
RootPart
position, transform, size, velocity.
Tool
enabled, toolTip; activated, equipped, unequipped. Its part named Handle is held.
Team
color, autoAssignable; getPlayers().
On a part
| Class | Members |
|---|---|
| Clickable | maxDistance; clicked(player) |
| Prompt | text, key, maxDistance, enabled; triggered(player) |
| Billboard | text, textColor, textSize, offset, maxDistance, backgroundColor, backgroundTransparency, enabled |
| Sign | text, face, textColor, fit, textHeight, textAlign, backgroundColor, backgroundTransparency, transparency, enabled |
| Sound | soundId, volume, looped, playing; play(), stop() (also in the world) |
| Light | color, brightness, range, angle, innerAngle, direction, enabled |
| Decal | image, color, transparency, face |
| Texture | A Decal that repeats: tileSize, tileOffset |
| Highlight | fillColor, fillTransparency, outlineColor, outlineTransparency, depthMode ("AlwaysOnTop", "Occluded"), enabled |
| Beam | part1, anchor, anchor1, color, transparency, width0, width1, enabled |
| Trail | color, transparency, width0, width1, lifetime, enabled |
| Zone | enabled; entered(player), left(player), partEntered(part), partLeft(part); players(), parts(), contains(what) |
| ParticleEmitter | rate, lifetime, speed, size, color, transparency, texture, spreadAngle, direction, acceleration, drag, lightEmission, lockedToPart, shape, turbulence and many more; emit(count?) |
| ParticleForce | mode ("Attract", "Vortex", "Wind", "Turbulence"), strength, radius, falloff, direction, frequency, enabled |
| Effect | Plays the particles on its part and inside it as one: play(), stop(), clear() |
Gameplay (no script needed)
| Class | Members |
|---|---|
| Teleporter | destination, enabled; triggered(player), teleported(player) |
| Hazard | damage, enabled; triggered, hurt |
| Checkpoint | enabled; triggered, reached |
| Pickup | stat, amount, respawnTime, enabled; triggered, collected |
| Boost | walkSpeed, jumpPower, duration, enabled; triggered, boosted |
| Motion | move, turn, pivot, time, pause, delay, reverses, looped, smooth, relative, enabled; arrived, triggered; restart() |
| Spawner | template, interval, limit, lifetime, velocity, relative, count, enabled; spawned(part); spawn(), clear() |
| Seat | occupant, enabled; sat(player), left(player); sit(player), stand() |
| VehicleSeat | A Seat that drives its Model's motor Hinges: maxSpeed, torque, turnSpeed, throttle, steer |
Joints and movers
| Class | Members |
|---|---|
| Hinge | part1, anchor, axis, enabled, limited, lower, upper, motor, speed, force, angle (read-only) |
| Slider | As a Hinge, with offset (read-only) instead of angle |
| BallJoint | part1, anchor, axis, enabled |
| Spring | part1, anchor, anchor1, length, stiffness, damping, currentLength |
| Rope | part1, anchor, anchor1, length, currentLength |
| Bone | holder, anchor, angles, offset, enabled |
| Mover | velocity, strength, relative, enabled |
| Spinner | spin, strength, relative, enabled |
| Thruster | force, relative, enabled |
Values and messages
| Class | Members |
|---|---|
| IntValue, NumberValue, StringValue, BoolValue | value; changed(new) |
| ObjectValue | value (a part, object or player); changed |
| Vector3Value, Color3Value | value; changed |
| BindableEvent | fire(...); event |
| BindableFunction | onInvoke; invoke(...) |
| Timer | interval, repeats, oneShot, running, timeLeft; fired; start(), stop() |
| RemoteEvent, RemoteFunction | Roblox's: FireServer, FireClient, OnServerEvent... KHIM scripts use net |
Animation
| Class | Members |
|---|---|
| Animation | keyframes (the clip's text), looped, length (read-only), preset |
| AnimationTrack | play(fade?, weight?, speed?), stop(fade?), adjustSpeed(speed), speed, looped, playing, length, timePosition, animation; stopped, ended |
World settings
| Class | |
|---|---|
| Collision groups | The world's table of which groups collide - edited in the Inspector |
| Camera settings | How the players' camera starts: mode, minZoom, maxZoom, fov, firstPersonArms, offset (read in scripts; change the camera with camera) |
UI
| Class | Members |
|---|---|
| Canvas | visible |
| Panel | position, size, anchor, backgroundColor, backgroundTransparency, visible, zIndex, layoutOrder |
| ScrollPanel | A Panel: canvasSize, canvasPosition, automaticCanvasSize, scrollBarThickness, scrollingEnabled |
| Label | A Panel: text, textColor, textSize, textAlign, textWrapped, textScaled, font |
| Button | A Label: clicked |
| TextInput | A Label: placeholder; focusLost(enterPressed) |
| Image | A Panel: image, imageColor, imageTransparency |
| ImageButton | An Image: clicked |
| ProgressBar | A Panel: value, min, max, fillColor |
| SliderInput | A ProgressBar the player drags: step; changed(value) |
| Toggle | A Label: checked, fillColor; changed(checked) |
| ListLayout | direction, padding, alignX, alignY, sortOrder |
| GridLayout | cellSize, cellPadding, sortOrder |
| Padding | top, bottom, left, right |
| Corner | radius |
| Border | color, thickness, transparency, applyTo ("Border", "Text") |
| Gradient | color0, color1, colorMid, midpoint, transparency0, transparency1, rotation, enabled |
| AspectRatio | aspectRatio, aspectType, dominantAxis |
| Scale | scale |
| SizeLimit | minSize, maxSize |
| TextSizeLimit | minTextSize, maxTextSize |
Scripts
Script, ClientScript, Module - see Scripting basics.