10/14/10 #2 - Events - Jacob__mybb_import1 - 10-15-2010
Events are now working (currently only Collided). This is how you use them:
Code: link(script.Parent.Collided, function(h) h.Color = Color(math.random(0, 255), math.random(0, 255), math.random(0, 255)) end)
This will make the part the script is in a color changer.
When a script is removed, any events created from it are deactivated.
I will work on tools tomorrow.
RE: 10/14/10 #2 - Events - ptown2 - 10-16-2010
can you give atleast a small example on a oncollided script?
because the one that you have is a slight bit confusing
RE: 10/14/10 #2 - Events - Jacob__mybb_import1 - 10-16-2010
Use link(object.event, function) to connect an object's event to a function. The function should take 1 argument, which will be the other part it collided with.
Code: link(script.Parent.Collided, function(h)
print(script.Parent.Name.." collided with "..h.Name)
end)
|