Note:

Zakkeh is currently the editor of Roblox News until further notice, contact him if you have any problems.
Roblox News Twitch Roblox News YouTube Roblox News Duck Hunt 2014 Roblox News Egg Hunt 2014 Spotlight of Silence

Tuesday, July 26, 2011

New Objects for advanced Scripters!

There are two new objects that will be helpful for advanced scripters!
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

1 comment:

Write your comment here... OR Flingi will eat you