PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Event

This event is fired when any script calls the Fire method of the BindableEvent.

Parameters

Name Type Default Description

Code Samples


BindableEvent Hello World

This code sample defines and connects a simple function to a BindableEvent. It then fires the BindableEvent, which in turn calls the connected function. It prints “Hello, world”. Test this script by pasting it into a BindableEvent within the Workspace or ServerScriptService.

local be = script.Parent

-- Define a simple function to connect
-- to the custom event
local function onEvent(...)
	print(...)
end
be.Event:Connect(onEvent)

-- Fire the event
be:Fire("Hello, world")