CharacterAdded event question

Hey guys, so, I’ve been developing a character customizer system, and I have a CharacterAdded event set up so each time the character loads in, it’ll remove all their default clothing and update it accordingly. However, I’m noticing that if there’s no wait in my event, the function seemingly never runs, and my character is still wearing all his default clothing.

Is there some sort of way to yield the thread until we know the character has fully loaded in? But here’s the thing, I could use like a wait(2) or something like that, but I would appreciate if it’d be possible to wait the minimal amount of time necessary to do this. Thanks!

2 Likes

You can use this event, call :Wait() on it before removing accessories.

https://developer.roblox.com/api-reference/event/Player/CharacterAppearanceLoaded

7 Likes

Thank you!

If you find the appearance is loading between the CharacterAdded event and the ChacterAppearanceLoaded event, you can call this function to check if it has loaded or not before calling your :Wait()

https://developer.roblox.com/api-reference/function/Player/HasAppearanceLoaded

You shouldnt havent to do this as generally it takes a second or so for appearances to finish loading.

3 Likes