Event (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens |
m Text replacement - "<SyntaxHighlight code="lua">" to "<syntaxhighlight lang="lua">" |
||
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
{{User:JulienDethurens/Example | {{User:JulienDethurens/Example | ||
|description=This code would print all the arguments passed to the [[Fire (Method)|Fire]] method of a {{type|instance=BindableEvent}}, whenever it is called. | |description=This code would print all the arguments passed to the [[Fire (Method)|Fire]] method of a {{type|instance=BindableEvent}}, whenever it is called. | ||
|code=< | |code=<syntaxhighlight lang="lua"> | ||
event = Instance.new('BindableEvent', Workspace) | event = Instance.new('BindableEvent', Workspace) | ||
event.Event:connect(function(arguments) | event.Event:connect(function(arguments) | ||
print(arguments) | print(arguments) | ||
end)</ | end)</syntaxhighlight> | ||
}} | }} | ||
[[Category:Events]] | [[Category:Events]] |
Latest revision as of 05:44, 27 April 2023
![]() | |
Description | Fires when the Fire method of the BindableEvent is called. arguments will be the arguments passed to the Fire method. |
---|---|
Member of: | BindableEvent |
Example
This code would print all the arguments passed to the Fire method of a BindableEvent, whenever it is called.
event = Instance.new('BindableEvent', Workspace)
event.Event:connect(function(arguments)
print(arguments)
end)