Problem with Weld/WeldConstraint

So I made my own vehicle seat system pretty similar to the Roblox system, but when I weld the character to the WeldPart the character floats. I was wondering if you guys know of any fixes

– This is how it looks like
image

I have tried doing this(screenshot underneth)

local weld = Instance.new("Weld",DriverSeat)
weld.Part0 = DriverSeat
weld.Part1 = player.Character.HumanoidRootPart
weld.C0 =  player.Character.HumanoidRootPart.CFrame:Inverse() * CFrame.new(0,-1,0)
weld.C1 = DriverSeat.CFrame:Inverse()

The code for disabling Humanoid States

player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)

but the only thing it accomplishes is just moving the character back down, but it’s still playing the floating animation.
image

I have also tried disabling the humanoid state also using WeldConstraint, but that didn’t do anything. So now I’m here asking you

Edit: Also forgot to mention that the player.Character moves above the rootpart itself
image

Ps: sorry if it’s hard to understand it’s pretty late and I’m feeling worn out.

You could turn of cancollide so it does not collide with the character. This will not work sorry for interupting you might want to make the seat not be inside the character. If you turn of cancollide people who try to touch the seat wont be able to get in instead you could use another get in the seat feature so you can turn off cancollide.

Sorry forgot to mention that but the part collision is always set to false, and the seat is parented to the boat not the character.

Maybe the wheel is too high as i see the character grips on to it and floats. you can lower the wheel and see if it works then.

Yeah I thought that as well then lowered it but still didn’t work

Is it mainly just the animation saying you’re floating?

Yeah, you could say the animation playing is the main problem

May be a stretch; but try playing the idle animation directly to said character? and then once the player is not on the wheel, the anim stops. Not sure.

Could you show us the code you used to disable certain Humanoid states?

Can’t you use a VehicleSeat? I think there’s a property that defines the character’s offset

1 Like

I can’t use the vehicle seat because I have made my own used to work perfectly with the boat system I’m working on. Also I have edited post with the code.

1 Like

Could you try setting all states to false and the “Seated” state to true?

1 Like

Nothing changed, I think it has to do with the character or weld itself.

1 Like

Okay, I’m not sure how to fix this then.

You could try playing a sitting / standing animation, but that might require to much work.

Good luck!