Yuari
Documentation
Docs/Instances/firetouchinterest

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

ParameterTypeDescription
originBasePartThe source part reported as the toucher.
targetBasePartThe part whose Touched / TouchEnded connection should fire.
statenumber0 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(...) and firetouchtransmitter(...) are aliases.