Is there anyway to find the size of a hat/accessory?

Is there anyway that I can be able to find the radius/size of an accessory on a character? If so, how?

I want to be able to find the size of a hat but not just remove all the hats a player is currently wearing. I’m currently making a game that mostly involves hiding and having a big accessory (Example: Big Box) would be very distracting and would ruin the experience in some cases.

I’ve tried making a white-list of specific hats but Roblox has so many hats and will continue to make more hats that would be too big for the game.

I already know how to remove hats using a script, I just need a way to find a size of a hat.
Please, and thank you.

(This is my very first DevForum post, sorry if I make any mistakes.)

2 Likes

I don’t think so. There aren’t any properties in a meshpart as far as I know that says the median size of a 3D model. But there totally could. Also maybe you could try blacklisting certain hats instead of whitelisting if there are only a few bad hats. But i think the best solution is having an ingame character editor for last minute changes

Sorry I meant to say “blacklist” instead of “whitelist”

1 Like

Maybe you could also try making larger hiding spots that work for larger hats.

You can use the Handle size, as I’m pretty sure that changes with the accessory size,
However, I have a feeling that it’s actually up to Blender (or whatever they use) and how the modeler scales it themselves. Anyhow, i’ll try to find some instances where the handles and the mesh sizes don’t at least roughly match up.
image
image
Despite it not being exact, as shown above, it should be good enough for your means.
hth!

3 Likes

Perhaps the mesh.Scale property can help you? You can check if it’s too big, and even if you want, you can resize it.

3 Likes

Unfortunately the mesh.Scale defaults to 1,1,1 and scales from the original size of the mesh.

EDIT: Would be great to have this feature however I’m guessing you’d have to convert between the mesh creator’s units and roblox’s

3 Likes

Oh I see, good to know

While this isn’t a contributor to your actual script, I think this would help you in the long run. The owner of Murder Mystery 2 has a script & module that has problematic UGC content and removes them from players, which will cover their bodies and hide them.

Asset Ban List : Script
Asset Global Ban List : Module

2 Likes

I heard about his script. Never knew that he made it a public one. Thanks!

2 Likes