firetouchinterest Synchronous

  • firetouchtransmitter

Submit a touch-begin or touch-end event for two BaseParts. Use it when checking a touch interaction on parts in the active world.

Syntax
Luau
firetouchinterest(first: BasePart, second: BasePart, state: boolean | number) -> ()

Parameters

Function parameters
ParameterTypeDescription
firstBasePartFirst parented BasePart.
secondBasePartSecond parented BasePart.
stateboolean | numberfalse or 0 begins touching; true or 1 ends touching.

Returns

()

No values.

Usage notes

Nil-parented parts are ignored because they do not participate in physics. Both parts receive the corresponding Touched or TouchEnded dispatch.

Example

Example
Luau
local first = Instance.new("Part")
local second = Instance.new("Part")
first.Parent = workspace
second.Parent = workspace
firetouchinterest(first, second, 0) -- begin
firetouchinterest(first, second, 1) -- end
first:Destroy()
second:Destroy()
Kawaii documentation