In my case, I wanted to use it to know when all the parts for a character have loaded on the client, however, it only seems to work on the server.
When on the server, I can loop, and it will return true when the characterās parts are all loaded, however on the client it returns true IMMEDIATELY, even when parts are not ready.
I was using a Player:ClearCharacterAppearance() to test.
On the client, it only removes some of the characters assets, unless I put a wait, for like 5 seconds. On the server it will not require a wait, but rather fire when ready.
Server Script
game.Players.PlayerAdded:Connect(function(player)
while not player:HasAppearanceLoaded() do
print("waiting server")
wait()
end
print("loaded server")
player.Character.ChildRemoved:Connect(function(child)
print(child.ClassName, 'removed from character')
end)
player:ClearCharacterAppearance()
end)
This gives outputā¦
15:20:00.849 waiting server (x11) - Server - Script:3
15:20:03.078 loaded server - Server - Script:6
15:20:03.078 Pants removed from character - Server - Script:8
15:20:03.078 BodyColors removed from character - Server - Script:8
15:20:03.078 Accessory removed from character (x3) - Server - Script:8
Client Script -without wait-
while not game.Players.LocalPlayer:HasAppearanceLoaded() do
print("waiting client")
wait()
end
print("loaded client")
game.Players.LocalPlayer.Character.ChildRemoved:Connect(function(child)
print(child.ClassName, 'removed from character')
end)
game.Players.LocalPlayer:ClearCharacterAppearance()
Outputsā¦
15:21:56.123 loaded client - Client - LocalScript:5
15:21:56.123 Pants removed from character - Client - LocalScript:7
15:21:56.124 BodyColors removed from character - Client - LocalScript:7
Client Script WITH the wait
wait(5)
game.Players.LocalPlayer.Character.ChildRemoved:Connect(function(child)
print(child.ClassName, 'removed from character')
end)
game.Players.LocalPlayer:ClearCharacterAppearance()
output for this isā¦
15:27:53.761 Pants removed from character - Client - LocalScript:4
15:27:53.761 BodyColors removed from character - Client - LocalScript:4
15:27:53.761 Accessory removed from character (x3) - Client - LocalScript:4
So you can see the HasAppearanceLoaded is returning true on the client before things have loaded.