Api > MLPlayer > SetProperty()
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:⚓︎
Name | Type | Description |
---|---|---|
key | string | The name of the property. Use this key to retrieve the property. Must be unique. |
value | any | The Value to set. Must be serializable for proper synchronization. |
Returns:⚓︎
type | Description |
---|---|
boolean | True 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)