Virtual input
inputDrive a Roblox Studio play client by simulating keyboard presses, mouse clicks, cursor moves, camera look, text entry, focus, and timed waits in ordered sequences through the real input pipeline.
Instructions
Human-like input in a play client through the real input pipeline (dm 'client' = lowest-numbered client, or 'client:N'). actions run in order:
{type:'key', key:'W', hold_ms:600 (≤ 60000)} press, hold, release; {type:'key', key:'Space', down:true|false} single edge
{type:'click', x, y, button:'left'|'right'|'middle'} down, 50 ms, up; {type:'move', x, y} absolute cursor; {type:'look', dx, dy} relative camera look — best effort: the step fails unless the camera actually rotated (the default camera script ignores virtual deltas; drive workspace.CurrentCamera from a
runinstead){type:'text', text}; {type:'focus', path:'PlayerGui.Hud.Input'} TextBox:CaptureFocus(); {type:'wait', ms (≤ 60000)} x,y default to GUI space (gui: true): the coordinates a GuiObject reports as AbsolutePosition; the runtime adds GuiService:GetGuiInset(). gui: false sends raw viewport pixels (inset included). Screenshot pixels are NOT viewport pixels: the screenshot is the whole Studio window scaled by
scale; the 3D viewport sits inside it at an offset you must calibrate (see the agent guide). Input only reaches the game while the Studio window renders (not minimized). Result: {steps:[{i, ok, error?}], elapsed_ms}. A failing step does not abort the sequence unless abort_on_error=true; keys still held when a sequence aborts or is cancelled are released. No scroll action: virtual input produces no MouseWheel events. For reactive or long-running input, install a controller withplaytest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dm | No | Target DataModel: 'edit' (default) | 'server' | 'client' (lowest-numbered) | 'client:N' | |
| actions | Yes | ||
| session | No | Studio session GUID or unique prefix (default: the active hub; required for writes when several Studios are connected) | |
| wait_ms | No | Wait this long for completion before returning a {job_id,status:"running"} handle (default 25000) | |
| abort_on_error | No | Stop at the first failing step (default false) |