The objects are:
CustomEvent
CustomEventReceiver
Here is how you would use them:
-- test custom events by connecting an event to a receiver, then raising it
local receiver = Instance.new("CustomEventReceiver")
receiver.Receive = function(num)
print("RECEIVED A NUMBER:", num)
end
local event = Instance.new("CustomEvent")
event:Connect(receiver)
-- receiver.Receive callback will now be called if event.Raise is called
event:Raise(42)
For more information, look at the object browser in ROBLOX Studio.
Help>Object Browser
-BCG
Nice. Very helpful. Thank You
ReplyDelete