hi, just wondering why this script doesn’t work?
What about it doesn’t work? Does it error? Does it run but not function? What are the results of it if it does run?
No errors at all, the head transparency works, however the hat removal doesn’t
Try using :GetDescendants()
instead of :GetChildren()
. There might be some accessories in body parts.
Change CharacterAdded to CharacterAppearanceLoaded
I have tried it out, however it still does not work
it worked for me, did you spell everything correctly? What did the output say?
there are no errors, and the output doesnt say anything
Did you try changing plr.CharacterAdded
to plr.CharacterAppearanceLoaded
?
yeah, however im still not sure why it isnt working
Accessories are all in the character I believe, I have a shoulder accessory that still appears under character - it wouldn’t make sense if only some were in character while others are stored elsewhere…
try printing something in the function and see if it prints.
my bad, turns out a made a stupid little mistake lol. I accidentally put head:GetDescendants() instead of char:GetDescendants()
Make sure to mark my reply as the solution just in case anyone else has the same question. Also, there is no need for GetDescendants, GetChildren will work fine as Accessories are only parented to the character model
Is this in a local script? Just making sure because I’ve scripted something in a local script instead of a server script by accident before. xd
Also, after some testing I got the same thing where it didn’t clear the accessories but I added a Player.CharacterAppearanceLoaded
function event before the for i,v *bla bla bla*
and it worked.
I have resolved it, the problem was because I used ‘head’ instead of the character. and obviously the accessories are not in the head lol