Coming from Roblox
If you have made games in Roblox Studio, most of what you know carries over: KHIM runs Luau, a unit is a stud, gravity is the same, and Roblox's API names still run - game:GetService, Instance.new, Vector3.new, part.Position, :Connect, FindFirstChild, RemoteEvent, leaderstats... KHIM has its own shorter names too, and these docs use them.
The same idea, KHIM's name
| Roblox | KHIM |
|---|---|
| Roblox Studio | KHIM Engine |
| Place | World (.khim) |
| Stud | Unit (the same length) |
| Creator Hub | Workshop |
| Publish | Go live |
| Shift lock | Camera lock |
| Explorer / Properties | Hierarchy / Inspector |
| Toolbox | Assets panel |
| Output | Console |
| Packages | Linked models |
Services
| Roblox | KHIM | In scripts |
|---|---|---|
| Workspace | World | world (workspace works) |
| ReplicatedStorage | ReplicationService | shared |
| ServerScriptService | ServerService | game.ServerService |
| ServerStorage | StorageService | game.StorageService |
| StarterPlayerScripts, ReplicatedFirst | ClientService | game.ClientService |
| StarterGui | UI | players.me.gui (a player's copy) |
| Players | - | players |
| Lighting | - | lighting |
| DataStoreService | - | data |
| CollectionService | - | tags |
| UserInputService | - | input |
| TweenService | - | object:tween(...) |
| HttpService (JSON) | - | json |
| Teams | - | teams |
Classes
| Roblox | KHIM |
|---|---|
| LocalScript | ClientScript |
| ModuleScript | Module |
| SpawnLocation | Spawn |
| Humanoid | Body (character.body) |
| HumanoidRootPart | RootPart (character.root) |
| ClickDetector | Clickable |
| ProximityPrompt | Prompt |
| BillboardGui | Billboard |
| PointLight, SpotLight, SurfaceLight | Light |
| HingeConstraint | Hinge |
| PrismaticConstraint | Slider |
| BallSocketConstraint | BallJoint |
| SpringConstraint, RopeConstraint | Spring, Rope |
| Motor6D | Bone |
| LinearVelocity, AngularVelocity, VectorForce | Mover, Spinner, Thruster |
| ScreenGui | Canvas |
| Frame, ScrollingFrame | Panel, ScrollPanel |
| TextLabel, TextButton, TextBox | Label, Button, TextInput |
| ImageLabel, ImageButton | Image, ImageButton |
| UICorner, UIStroke, UIPadding | Corner, Border, Padding |
| UIListLayout, UIGridLayout | ListLayout, GridLayout |
| UIGradient, UIAspectRatioConstraint | Gradient, AspectRatio |
| UIScale, UISizeConstraint, UITextSizeConstraint | Scale, SizeLimit, TextSizeLimit |
The leaderstats folder | player.stats |
The same code, both ways
-- Roblox's names (still run in KHIM)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Parent = leaderstats
end)
workspace.Coin.Touched:Connect(function(hit)
local player = Players:GetPlayerFromCharacter(hit.Parent)
if player then
player.leaderstats.Coins.Value += 1
end
end)-- KHIM's names
players.joined:connect(function(player)
player.stats.Coins = 0
end)
world.Coin.touched:connect(function(hit)
local player = players.fromPart(hit)
if player then
player.stats.Coins += 1
end
end)| Roblox | KHIM |
|---|---|
Instance.new("Part", parent) | new("Part", parent) |
Vector3.new(1, 2, 3) | vec3(1, 2, 3) |
Color3.fromRGB(255, 0, 0) | rgb(255, 0, 0) |
CFrame.new(pos), CFrame.lookAt(a, b) | transform(pos), transform.lookAt(a, b) |
UDim2.new(0.5, 0, 0, 40) | dim(0.5, 0, 0, 40) |
part.Position, part.CFrame | part.position, part.transform |
:Connect, :Wait, :Disconnect | :connect, :wait, :disconnect |
FindFirstChild, WaitForChild | find, waitFor |
GetChildren, IsA, Destroy, Clone | children, isA, destroy, clone |
TweenService:Create(part, TweenInfo.new(1), goals):Play() | part:tween(goals, 1) |
RemoteEvent:FireServer(...) / .OnServerEvent | net.send(name, ...) / net.on(name, fn) |
RemoteEvent:FireClient(player, ...) / FireAllClients | net.send(player, name, ...) / net.sendAll(name, ...) |
RemoteFunction:InvokeServer / OnServerInvoke | net.call / net.handle |
DataStoreService:GetDataStore(n):GetAsync(k) | data.store(n):get(k) |
UserInputService.InputBegan | input.began, or input.onKey(key, fn) |
workspace.CurrentCamera | camera |
workspace:Raycast(origin, dir) | world:raycast(origin, dir) |
Players:GetPlayerFromCharacter(hit.Parent) | players.fromPart(hit) |
humanoid:TakeDamage(10) | player:damage(10) |
game:BindToClose(fn) | game.closing:connect(fn) |
wait(1), tick() | task.wait(1), time() |
KHIM Engine's suggestions follow the script: one written with Roblox's names is offered Roblox's names.
What is different
- No studs on parts. Plastic is a block with eased edges. Roblox's flat SmoothPlastic is KHIM's Smooth.
- Parts weigh their material: a Metal part is heavy, Wood light.
applyImpulsedivides by the real mass. - The camera is not an object: it is the
cameraglobal in ClientScripts. - No Attachments. Joints, Beams and movers take an
anchor(avec3in their part's space) instead. - Gameplay with no code: Teleporter, Hazard, Checkpoint, Pickup, Boost, Motion, Spawner, Seat - see Touch, prompts and zones.
- Animations are keyframes in your world, made in KHIM Engine's animation editor; Roblox's uploaded animation IDs don't play.
- Sounds and pictures are KHIM's built-in ones or your own uploads (reviewed), named
"coin"or"asset:123"- Roblox asset IDs mean nothing here. - No web requests:
HttpService:GetAsyncand friends are an error. - A server Script's change to a Decal, Light or Highlight doesn't reach players: change them from a ClientScript (Sounds, lights and effects).
- Not yet in KHIM: Terrain, SurfaceGui, ViewportFrame, MarketplaceService.
Importing a Roblox world
KHIM Engine can open a .rbxl / .rbxlx world (and .rbxm / .rbxmx models) you made: turn the importer on in the Plugins panel, then File > Import .rbxl / .rbxlx.... An Imported window says what came across and what was left out.
What comes across: parts and their CFrames, sizes, colours, materials; Models and Folders; scripts (unchanged - Roblox's names run); welds; sounds, values, ClickDetectors, lights, ProximityPrompts, particles, decals, highlights, beams and trails; UI; constraints and movers; tags and attributes; Lighting; Teams. Left out: Humanoids, Motor6Ds, Attachments, MeshPart meshes (they become blocks), Terrain, BillboardGuis and SurfaceGuis, Roblox audio and picture IDs.
Only your own games
Publish only worlds you made or have the right to publish. Going live with an imported world asks you to confirm it, and the world is marked as imported. KHIM is not affiliated with Roblox Corporation.