The current and only way with my knowledge of how to change the part the event is listening to is by disconnecting the event and then reconnecting it with another afterwards. It goes something like:

local part = workspace.Part
local part2 = workspace.Part2

local function on()
	print "touched"
end
local connection = part.Touched:Connect(on)

wait(5)
connection:Disconnect()
part2.Touched:Connect(on)

I do not know if there's any other way of reconnecting an event more efficiently to another part and I've tried thinking of alternatives but failed so then I decided to ask here and hope that my question is understood.

1 comment

0

Anything wrong with disconnecting it?