CharacterAppearanceLoaded

This event fires when the the full appearance of a Player's Player/Character has been inserted.

Player/Character's generally have a range of objects modifying their appearance including Accoutrement|Accoutrements, Shirt|Shirts, Pants and CharacterMesh|CharacterMeshes. This event will fire when all such objects have been inserted into the Player/Character.

One use for this event, is to remove and save aspects of a Player/Character|Characters appearance to be used later. See below for an example of this.

local Players = game:GetService("Players")
local function playerAdded(player)
player.CharacterAppearanceLoaded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
-- save hats for later
local accessories = {}
for _, accessory in pairs(humanoid:GetAccessories()) do
table.insert(accessories, accessory:Clone())
end
-- remove hats
humanoid:RemoveAccessories()
wait(5)
-- make sure the player still exists, and has the same character
if player and player.Character and player.Character == character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid:GetState() ~= Enum.HumanoidStateType.Dead then
-- give back the hats
for _, accessory in pairs(accessories) do
humanoid:AddAccessory(accessory)
end
end
end
accessories = nil
end)
end
-- get existing players
for _, player in pairs(Players:GetPlayers()) do
playerAdded(player)
end
-- listen for new players
Players.PlayerAdded:Connect(playerAdded)

How this site use cookies

This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.