|
| 15 Feb 2017 01:30 AM |
I'm using a .Died and only want it to run once, so I want to disconnect this event, once it fires its function;
function() --disconnect caller
.Died function() |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2017 01:34 AM |
local event
event = someEvent:connect(function() event:disconnect() -- do stuff end)
Or you could do something like
someEvent:wait() -- do stuff
That would yield the thread until the event is fired. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2017 01:38 AM |
| Works perfectly, thanks... |
|
|
| Report Abuse |
|
|