Skip to main content

MLPlayer.SetProperty(string key, any value)

Sets a custom property to the player. Custom properties are synchronized between the clients. Make sure the property type is serializable. Check out serializable types here

Parameters:

NameTypeDescription
keystringThe name of the property. Use this key to retrieve the property. Must be unique.
valueanyThe Value to set. Must be serializable for proper synchronization.

Returns:

typeDescription
booleanTrue if setting the property was successful.

Usage

---@type MLPlayer
local mlplayer;

---@type string
local key;

---@type any
local value;


local val0 = mlplayer.SetProperty(key, value)