Skip to main content

MLClickable.OnClick

"Read-Only"

This property is Read-Only

NameType
OnClickEventHandler

Event callback function requirement

info

This property is an event. It means that you need to add a listener function to it. Here how that function needs to look like.

function(MLPlayer player);

Parameters
NameTypeDescription
playerMLPlayerThe Player who clicked it

Usage

--- @type 
local mlclickable;

--- callback function called when event triggers
--- @param mlplayer MLPlayer
local function CallBack(mlplayer)
-- code to handle event call back
end


-- Regsiter callback function
mlclickable.OnClick.Add(CallBack);

Description

Event which will trigger when player clicks the object.