Skip to content

Api > MLPlayer > SetAvatar()


MLPlayer.SetAvatar(string guid)⚓︎

Set the avatar for the current avatar. Note that this function only works for local player, and it always shows a prompt for user to allow changing avatar. You can use CurrentAvatarGuid property to check if player have the avatar you desire.

Parameters:⚓︎

Name Type Description
guid string The Guid of the desired Avatar. The Function will throw argument exception if this value is empty or doesn’t point to an avatar on server.

Usage⚓︎

---@type MLPlayer
local mlplayer;

---@type string
local guid;


mlplayer.SetAvatar(guid)