Drive the player during a playtest
characterMoves and acts as the player in a running playtest to test gameplay without user input. Walks to positions, performs actions like jump or use tool, and reports state.
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, 'path' checks a route without walking it, 'act' performs an action, 'state' only reports. | |
| to | No | Target position, e.g. "25, 5, -10". Used by moveTo and by teleport. | |
| from | No | path only: where the route starts, e.g. "0, 5, 0". Defaults to the character. | |
| path | No | moveTo only: walk to this instance instead of a coordinate. | |
| tool | No | equip only: the Tool's name. | |
| costs | No | Material or PathfindingModifier label → cost, e.g. { "Water": 20 } to avoid swimming. Higher is more avoided; the route chosen is the cheapest total, not the shortest. | |
| 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. | |
| toPath | No | path only: an instance to end at instead of `to`. | |
| canJump | No | moveTo only: allow the path to include jumps. | |
| spacing | No | Studs between waypoints, default 4. Tighter follows the geometry more closely; wider is a coarser route. | |
| canClimb | No | Whether it may climb truss. Off by default. | |
| fromPath | No | path only: an instance to start from, e.g. "Workspace.SpawnLocation". | |
| studioId | No | The PLAYTEST session's id — not the editor's. See list_studios. | |
| agentHeight | No | How tall the walker is. Defaults to 5, a standard character. | |
| agentRadius | No | How wide the walker is, in studs. Defaults to 2 — a standard character. Raise it to ask whether a bigger NPC fits through the same gaps a player does. |