Why do functions like CharacterAppearanceLoaded not run sometimes?

Why does this happen? Are there other methods that wait until the players appearance has been loaded, before doing stuff?

Are you sure that you are connecting to it before it’s firing?

Actually I don’t think I am, I do data requests before that. Is that the problem?

It is certainly possible if there is any form of significant delay between when the player joins and when you are connecting to this event. Your event listener will only be fired for events that occur after the connection is made.

Depending on how your code is written, it might be easy to figure out if this is the problem for you though. Assuming you’re connecting this listener when the player joins, does it fail the first time they load and work afterwards?

1 Like

Yeah sometimes it fails and works afterwards, so maybe I just need to wrap a coroutine around whatever i’m tryna do before connecting it so it connects instantly?

Yeah, I’d probably try to avoid waiting for any yielding operation such as DataStoreService calls before connecting in this case.

How do you suggest I load data then, because the only logical idea is to load it when they join?

You don’t have to avoid loading their data when they join. I see two choices that you have regarding your issue with this event:

If you don’t need the player’s data for whatever your event listener is doing, simply connect to the event before the data calls.

If you do need the player’s data for whatever your event listener is doing, you can wait for the data to load and then:

  • connect to the event the same way you are now, then
  • also check to see if the character’s appearance has already loaded and, if so, do the same thing your event listener does when the event is fired.