TouchTransmitter
An internal object used by networking and replication code to transmit BasePart.Touched and BasePart.TouchEnded events.
The TouchTransmitter object named 'TouchInterest' is created and parented to a BasePart when the BasePart.Touched or BasePart.TouchEnded events are listened (connected) to.
Removing the TouchTransmitter will prevent the touched events from working. The TouchTransmitter object can also be removed exclusively on the client. This will prevent collisions from models the client has network ownership of (such as the player's character) from registering.
Note, in almost all circumstances developers should disconnect the connection using RBXScriptConnection:Disconnect() method rather than removing the TouchTransmitter. Otherwise the connection will not be cleaned up which can cause performance issues over time.
Code Samples
local part = Instance.new("Part")
part.Anchored = true
part.Position = Vector3.new(0, 1, 0)
part.Parent = workspace
part.Touched:Connect(function()
print("part touched!")
end)
local touchTransmitter = part:WaitForChild("TouchInterest")
if touchTransmitter then
print("removing TouchTransmitter!")
touchTransmitter:Destroy()
end