ChangeActorAppearance||doc136366

September 20, 2022

Format

ActorWindow:ChangeActorAppearance(partName, appearanceName)

Describe

Change the appearance image displayed by the role in the window. The changeable appearance must exist in the role resource.

parameter

Variable name Type Describe
partName string Part name, which is called mutually exclusive group name in the role editor
appearanceName string Appearance name, which is called appearance group name in the role editor

Code example

local actorWnd = UI:CreateGUIWidget(Enum.WidgetType.Actor)
actorWnd.AlignmentFormat = Enum.AlignmentFormat.MiddleCenter
actorWnd.Size = UDim2.new(0,400,0,400)
actorWnd.Actor = "asset/Actor/charactor/charactor_boy/character_boy.actor"
actorWnd:ChangeActorAppearance("clothes", "armor_chest_blue")
UI.Root:AddChild(actorWnd)