Shopping cart Tool to HumanoidRootPart like Brookhaven?

Brookhaven attaches the Shopping Cart / Stroller tools to the HumanoidRootPart, so it is always rigid regardless of your hands or your animations.

How did they achieve this?

2 Likes

They didn’t use a Handle inside of the tool. Instead, they weld/unweld the cart every time you equip/unequip the tool. You can set the cart’s CFrame relative to the HRP using this:

cart.CFrame = HRP.CFrame:ToWorldSpace(offsetCFrame)

Then use WeldConstraints and weld the cart to the HRP.

1 Like

There is a glitch where this works for a few moments on the client, and then the Tool dissapears. Is the Weld on the Client not enough?

The weld should happen on the server instead.

The client side weld will seem like it’s working, but don’t forget that the server will not replicate the weld. And so the cart will probably fall through the ground and get :Destroy()ed, and then the server will tell the client that the cart is destroyed.

TL;DR
Weld it on the server.

2 Likes