Skip to main content

Room.OnMasterClientSwitched

"Read-Only"

This property is Read-Only

NameType
OnMasterClientSwitchedEventHandler

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 newMasterPlayer);

Parameters
NameTypeDescription
newMasterPlayerMLPlayerPlayer whom their client is the new master client.

Usage


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


-- Regsiter callback function
Room.OnMasterClientSwitched.Add(CallBack);

Description

Event triggered when the room master client switches. New master client player is passed with this event.