FAQ and troubleshooting
Scripts
My script doesn't run
- Where is it? A Script doesn't run in StorageService or UI; a ClientScript doesn't run in ServerService or StorageService. KHIM Engine dims a script that won't run where it is - hover it for why.
- Is there an error? Open the Console (Ctrl J) during a test; errors are red, and clicking one opens the line. The Problems tab lists every script's errors at once.
- Does it wait for something that never comes?
waitFor("Name")warns after 5 seconds when nothing by that name appears - check the spelling, capitals included.
"attempt to index nil with ..."
What came before the dot is nil: the object isn't there (yet), or its name is spelt differently. In a ClientScript the world arrives a piece at a time - use waitFor:
local door = world:waitFor("Door")"... is not a valid member of Part; did you mean ...?"
A misspelt member. KHIM's members are camelCase: position, not Position... though Roblox's Position works too. Follow the "did you mean".
My ClientScript's change only shows for me
That's how it works: a ClientScript's change to a part stays on that player's screen. Make changes that matter in a server Script, and have the ClientScript ask with net.send. See Server and client.
My server Script changes a Light / Decal / Billboard, and players don't see it
The looks on parts are each player's own after they join: change them from a ClientScript (the server can tell clients to with net.sendAll). See Sounds, lights and effects.
My ClientScript works in the test but not for players
A ClientScript or Module over 64 KB of text never reaches players. Split it into Modules, each under 64 KB.
A script stops with an error about running too long
A loop without a wait. Add task.wait() inside every while true do.
My data isn't saved
- Guests (
userId-1) are never saved - test signed in. - Wrap
getandsetinpcalland print the error. - Save in
players.left, and read what you need before anytask.waitthere. - See Saving data.
Building
My part falls when I press Play
It isn't Anchored. Tick Anchored in the Inspector's Behavior section.
Players walk through my part
CanCollide is off, or its collision group doesn't collide with Players. View > Collisions outlines everything players walk through.
My imported model is the wrong size, or lying on its back
In the import window: Studs a unit (1 for Blender), Up is (Z for models exported Z-up), Turned. If it is inside out, tick Turn faces over.
Players fall through my MeshPart building
A MeshPart collides as its box. Put invisible anchored parts where the floors and walls are.
My uploaded picture or sound doesn't show for players
It is waiting for a moderator (an amber ring on its card in the Assets panel). You see it in KHIM Engine meanwhile; players get it once it is approved. Rejected ones say why in the tooltip.
Going live
Go live is greyed out or fails
- Sign in (Home > Sign in with browser).
- A game name is 3 to 60 characters.
- A world is 16 MB and 10,000 parts at most.
- An imported
.rbxlworld needs the "I made this place" box ticked.
Players still get the old version
Servers already running keep their version until they empty. Shut them down from the Workshop's Live page to move everyone over.
My game isn't in the lists
New games start private. Set Visibility to public in the Workshop > the world > Settings.
Performance
The game lags
- Settings > Graphics quality: leave it on Automatic, or lower it. Level 1-2 suit weak phones.
- F3 shows frames a second and draw calls; Shift+F5 shows physics, rendering and network times.
- In KHIM Engine, F3 during a test names the busiest scripts.
- Fewer, bigger parts draw faster than many small ones; Smooth suits big flat surfaces.
- A huge world: set
world.streamingRadiusso players get only what is near them.
The world is blank, only the HUD shows
Usually an old graphics driver: update it from your graphics card maker's website. KHIM needs OpenGL 3.3 (Intel HD 4000, AMD Radeon HD 5000, NVIDIA GeForce 400 and later).
Logs
When something goes wrong, these files say why:
| Windows | |
|---|---|
| The KHIM app | %LOCALAPPDATA%\KHIM\runtime\client\client_log.txt and client_error_log.txt |
| KHIM Engine | %LOCALAPPDATA%\KHIM Studio\runtime\studio\studio_log.txt (and studio_log.old.txt for the run before, where a crash's report is) |
Send them with a bug report.
Still stuck?
Use the search (Ctrl K) - it finds Vietnamese without its marks too. Or ask on khim.net.