Waiting in a script until the character's shirt gets loaded

Hello,
I’m making a script that waits until the character’s shirt and pants are loaded in then continues I’m currently using repeat until but it keeps sending me an error and I don’t want to add a wait() in the script is there a better way to wait until something is loaded? I tried using FindFirstChild() but it kept waiting infinitely.

Code line:

repeat wait() until character:WaitForChild("Shirt") and character:WaitForChild("Pants")

Error:
Not running script because past shutdown deadline (x10)
and
Error: Line 8
^ Line 8 is the code line i provided above

Any help is appreciated.

try using CharacterAppearanceLoaded

An example would be:

player.CharacterAppearanceLoaded:Wait()
-- rest of code
1 Like

It appears that roblox doesn’t add in a shirt or pants if you dont have any on I just figured that out because I looked at my avatar.