Disconnect (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>MrNicNac
New page: <onlyinclude>{{Method |name = disconnect |description = Disconnects a function from an event so it is no longer active. |object = Event }}</onlyinclude> {{clear floats}} {{Example| Below...
>Emess
No edit summary
Line 17: Line 17:
</pre>
</pre>
}}
}}
[[Category:Methods]]

Revision as of 23:22, 13 May 2011

disconnect( )
Returns nil
Description: Disconnects a function from an event so it is no longer active.
Member of: Event


Example

Below is an example of connecting a function and then disconnecting it.

local Connection = script.Parent.Touched:connect(function()
print("Hit")
end)

Connection:disconnect()