How to *RELIABLY* detect if a character is fully loaded?

Hello. I am attempting to detect if a player’s character has or not fully loaded.
My objective is to be able to use the server to alter their outfits, but that is not possible if said outfits have not loaded in yet.
When CharacterAdded() runs, the character is spawned in with all the default components in it; Humanoid, HumanoidRootPart, Torso, Legs, Arms, ETC. However, it takes a moment (probably a few milisseconds, or a little less than a second, maybe more, I have not counted) for the classic outfits and accessories to get added into the character, which frankly, is fine by me. Or rather, it would be, if only HasAppearanceLoaded() was reliable for this use-case.

See, I have read the documentation, and so, did the following attempt to solve the problem: Whenever CharacterAdded runs, a simple loop keeps checking for HasAppearanceLoaded() until it’s true.

	while not player:HasAppearanceLoaded() do
		task.wait(0.2)
	end

Simple, no? Should take it only one or two attempts. But what they don’t tell you is that HasAppearanceLoaded() fails to work when a character is added after the first time.

That is to say;
When the player is first joining the game, it works like a charm, but whenever the character resets, HasAppearanceLoaded() stops working completely, returning true at all times.

And don’t get me wrong, HasAppearanceLoaded() is a method that you run on the PLAYER object, which means that this is most likely intended behavior, yes? Because the player object never has to load more than once. I understand, yes.
Well, if that is the case, it would be great if they made that clear in the documentation, since they only lightly imply that it only works once, with:

This is useful when determining whether a player’s appearance has loaded after they first join the experience

Check source for more info: https://create.roblox.com/docs/reference/engine/classes/Player#HasAppearanceLoaded

EDIT: Turns out HasAppearanceLoaded() does work as intended, but only to an extent. It so happens that when CharacterAdded() is triggered, for some reason, HasAppearanceLoaded() is ALREADY TRUE, which doesn’t make any sense, since the character is in fact, not fully loaded. The definition of “loaded” may vary, but by that I say, not all the necessary components are present there. That being said, the question stands;

2nd EDIT: This is an R6 only issue. See solution for more information.

Is there any realiable way I can use to check if the character has completed loading when it spawns in once more, especifically after resetting?

1 Like

have you tried working around player.CharacterAppearanceLoaded? or even yield the script until this event runs :

local character = player.CharacterAppearanceLoaded:Wait()

-- or switching your CharacterAdded event to CharacterAppearanceLoaded

player.CharacterAppearanceLoaded:Connect()
1 Like

This might work, but oddly enough, while testing what you suggested, I decided to actually test :HasAppearanceLoaded() on a baseplate, and for some reason it works even after resetting. I will conduct some more testing and come back with further results, or a code snippet in case the problem finds itself elsewhere.

I have determined the source of the issue. HasAppearanceLoaded DOES work as intended, even when resetting, however, when CharacterAdded() runs, HasAppearanceLoaded() is already true! Which does not make one bit of sense, since the character is in fact not completely loaded!

1 Like

Found the issue:
This is an R6 only issue. My avatar is R15 by default, but my game is R6.

That said, my guess is that the Roblox Engine takes more time to convert an R15 avatar to an R6, And therefore HasAppearanceLoaded() is set to true prematurely. (Which is weird because you’d think they’d assure the accessories are added in before setting HasAppearanceLoaded() to true, but hey R6 is practically deprecated at this point so you never know.)

My choice of solution: Swapping to R15 and utilizing an R6 converter R15 model instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.