Event (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
m Text replacement - "<SyntaxHighlight code="lua">" to "<syntaxhighlight lang="lua">"
 
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=<SyntaxHighlight code="lua">
|code=<syntaxhighlight lang="lua">
event = Instance.new('BindableEvent', Workspace)
event = Instance.new('BindableEvent', Workspace)
event.Event:connect(function(arguments)
event.Event:connect(function(arguments)

Latest revision as of 05:44, 27 April 2023

Event ( Tuple arguments )
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)