firetouchinterest
Starts (state 0) or ends (state 1) a touch between two BaseParts, producing the engine's Touched and TouchEnded events.
Syntax
firetouchinterest(origin: BasePart, target: BasePart, state: number) -> nil
firetouch(origin: BasePart, target: BasePart, state: number) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
origin | BasePart | The source part reported as the toucher. |
target | BasePart | The part whose Touched / TouchEnded connection should fire. |
state | number | 0 starts the touch, 1 ends it. |
Returns
No return value.
Description
For state 0 the VM overlaps the target with the origin so Roblox's own touch detection fires Touched with the origin as the other part. The target stays overlapped until state 1, which restores its original position and fires TouchEnded.
The call requires Hybrid Luau and a focused game window. firetouch and firetouchtransmitter are aliases.
Example
local player = game.Players.LocalPlayer
local hrp = player.Character.HumanoidRootPart
local coin = workspace.Coin
-- Simulate touch
firetouchinterest(hrp, coin, 0)
task.wait()
-- Simulate untouch
firetouchinterest(hrp, coin, 1)
Notes
- State 0 starts the touch; state 1 restores the target and ends it. Call state 1 so the target is not left displaced.
- The VM temporarily relocates the target part; its original position is restored on state 1.
- If the target is destroyed before state 1, the restore and TouchEnded cannot run.
- Requires Hybrid Luau and a focused Roblox window.
firetouch(...)andfiretouchtransmitter(...)are aliases.