Setting transparency of an accessory?

I have a script that I’m working on that sets a player up to play as a ghost when they die. The problem is that I cannot get the transparency of the accessory to display correctly as transparency is not a child of the accessory. Does anyone have any suggestions or work-arounds?

died

2 Likes

You would need to check the Handle part of the accessory. Each accessory comes with a Part called “Handle” (Which represents the accessory itself, It comes with the Mesh, etc) So you would just need to change the Handle’s Transparency.

4 Likes

When looping through the descendants of the Character model, make sure to check that the Instance on each iteration of the loop is a BasePart, as that will ensure it doesn’t try to modify the Transparency property for any objects that don’t have that property.

2 Likes

An accessory itself, does not have neither a “visible” nor a “transparency” property. An accessory always comes with a handle, the part that actually lets you see the visual accessory.

Plus, I agree with @StrongBigeMan9 ,

When you are checking for descendants/children, make sure those belong to “BasePart” class. Other classes I know that have transparency property are UI’s stuff. So BasePart is apparently the only class ( that belongs to actual parts and visual bricks) that has that property.

2 Likes

Thanks for the replies. Changing the transparency of the handle causes some strange clipping issues but I guess that’s the only current option. Cheers.

1 Like