#Disabling a event - function?

10 messages · Page 1 of 1 (latest)

rain narwhal
#

I would add an argument bool value when firing a function whether or not you want it to be fired, if it is possible

rigid tendon
#
local connection = part.Touched:Connect(Func1)

if After_1506_Lines_Later then
    connection:Disconnect()
end
rain narwhal
#

that's helpful

rigid tendon
#

Both.

#

When you connect an event to a function, it returns connection.

#

You can :Disconnect() that connection.
You can also do path.Touched:Once(Func1) to only have the function disconnect after running once.

rain narwhal
#

damn

#

that's very useful

cedar sage