Drive the player during a playtest
characterAutomate playtest character movement and actions for gameplay testing, including pathfinding, jump, sit, equip/activate tools, and state checks to verify results.
Instructions
Moves and acts as the player character in a running playtest, so gameplay can be tested without asking the user to play it.
moveTo walks to a position or to an instance, following a path computed around walls and gaps rather than a straight line into them. It reports whether it ACTUALLY ARRIVED and how far short it stopped — a route blocked by something you did not know about otherwise looks identical to a successful walk.
act does the one-shot things worth testing: jump, sit, stand, respawn, kill (to exercise the death and respawn path), teleport, and equip/activate to use a Tool — which is how combat gets tested, since Activate is exactly what a mouse click triggers. Note that teleport skips everything in between, so triggers and collisions along the route do not fire — walk if you are testing those.
state reports position, health, walk speed and what the humanoid is doing. Call it before and after anything else here.
This drives the Humanoid directly rather than simulating keystrokes, which is the right tool for going places: pathfinding around a wall is one call here and a sequence of guessed key presses otherwise. For anything bound to a control rather than to movement — does E open the door, does the sprint key work, does Escape close the menu — use input, which sends real key and mouse events.
REQUIRES A RUNNING PLAYTEST, and the character lives in the playtest's data model — address these to the playtest's studioId from list_studios, not the editor's. Run mode has no character at all; use playtest op=play.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | 'moveTo' walks somewhere, 'act' performs an action, 'state' only reports. | |
| to | No | Target position, e.g. "25, 5, -10". Used by moveTo and by teleport. | |
| path | No | moveTo only: walk to this instance instead of a coordinate. | |
| tool | No | equip only: the Tool's name. | |
| action | No | act only: what to do. 'equip' takes a Tool from the Backpack or StarterPack, 'activate' uses it (what a mouse click triggers). | |
| direct | No | moveTo only: walk straight at the target without pathfinding. Use when a route is reported unreachable but you want to see what happens. | |
| player | No | Which player, by name. Omit for the only one; needed in a multiplayer test. | |
| canJump | No | moveTo only: allow the path to include jumps. | |
| studioId | No | The PLAYTEST session's id — not the editor's. See list_studios. |