Attaching Hats to Pets

Currently I’m scripting some pets for my game, and at some point I want to be able to have players choose hats for them. While attaching an accessory easily puts the hat on top of the pets head, the hat unfortunately doesn’t follow the pets hovering animation.

I’ve experimented trying WeldConstraints as well as Motor6D’s.

I provided a short video below going over the issue and showing my explorer.

Video showing problem.

Watch 2024-05-22 13-01-41 | Streamable

Note: Having a separate pet animation for each individual hat is not a solution.

You. Can attach the hats with a weld and instead of tweening the pets you’ll have to either lerp them or use a force and bodygryo of some kind.

Not sure if you watched that little video provided, but no tweens were used throughout. Pets work using BodyMovers, AlignPosition, AlignOrientation.

I’ve tried out Welds and MotorCD’s.

A possible solution, but I don’t like it. Is casting a ray down from the hat onto the pet, and positioning the hat above that point… but that sounds like it’ll be jittery and very unsmooth.

An easy solution is just not animating the pet and instead use what you have to make it bob up and down. I see that the hat does follow the pet it just doesn’t animate… so that’s a quick way to fix it ig?

2 Likes

Oh, I think you’re absolutely correct and I didn’t think about this… :man_facepalming:

Let me try this out.

1 Like

Me and my pet thank you kindly.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.