I was making a shopping game, and I was trying to weld the shopping cart to the HumanoidRootPart.
Although, when ever I welded it in several different ways, it gave me weird walking physics that I did not want in my game.
Weird walking physics: https://gyazo.com/184b6026bd312a6885278315afe6478f
Welding part of code:
local cart = game.ReplicatedStorage.Carts:FindFirstChild(plr.Data.Cart.Cart.Value)
for _,child in pairs(cart:GetDescendants()) do
if child:IsA(“BasePart”) or child:IsA(“WedgePart”) or child:IsA(“MeshPart”) then
local weld = Instance.new(“WeldConstraint”,cart)
weld.Part0 = cart.PrimaryPart
wled.Part1 = child
end
end
local weld = Instance.new(“Motor6D”,cart)
weld.C0 = CFrame.new(plr.Character.HumanoidRootPart.CFrame.lookVector * 7)
weld.Part0 = plr.Character.HumanoidRootPart
weld.Part1 = cart.PrimaryPart
cart.Parent = plr.Character
The Primary part is close to the middle of the shopping cart.
I have tried welding constraints, Motor6D, and both of them combined. Also welding to the Upper and Lower Torso (They all gave me very similar results.
I do not want to use a script that repositions the cart fast. I just want the cart to be welded to the character and allow for the character to rotate and walk normally.