OnMasterClientSwitched
7/14/25Less than 1 minute
Room.OnMasterClientSwitched
"Read-Only"
This property is **Read-Only**
Name | Type |
---|---|
OnMasterClientSwitched | EventHandler |
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
Name | Type | Description |
---|---|---|
newMasterPlayer | MLPlayer | Player 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.