firetouchinterest
Triggers a Touched event on a BasePart with the other wanted part.
function firetouchinterest(part: BasePart, part2: BasePart, toggle: boolean | number): ()Parameter
part- The part initiating the touch.part2- The part to be touched.toggle- Determines the touching event trigger.false- Starts the Touched event. (Touch, internally).true- Ends the Touched event. (Untouch, internally).
Example
local DummyPart = Instance.new("Part")
DummyPart.CFrame = CFrame.new(0, -200, 0)
DummyPart.Anchored = true
DummyPart.Parent = workspace
DummyPart.Touched:Connect(function(arg1)
print(arg1:IsDescendantOf(game.Players.LocalPlayer.Character))
end)
firetouchinterest(game.Players.LocalPlayer.Character.Head, DummyPart, false)
task.wait(0.5)
firetouchinterest(game.Players.LocalPlayer.Character.Head, DummyPart, true)Last updated