Problem with car glitching when player hops out

I’m currently having a problem with the player exiting their car, the car flips over / glitches out everytime the player gets out,

I’ve already tried getting rid of collision entirely between the car and the player and that is not the issue, There’s something else at hand but i can’t spot it.

Here’s how i’m handling the player when they get out of the car:

--localscript
func2 = DriveSeat:GetPropertyChangedSignal('Occupant'):Connect(function()
		func:Disconnect() --This func is what controls the car, the suspension, movement, etc.
		Cam.CameraSubject = plr.Character.Humanoid
		
		for i, v in pairs(Attachments) do
			Chassis['BodyThrust'..v.Name].Force = Vector3.new() --Thrusters for the suspension, their 
		end --force goes back down to 0 so the car doesn't flip.
		
		Chassis.Velocity = Chassis.BodyVelocity.Velocity
		Chassis.BodyVelocity.Velocity = Vector3.new() --This is meant to let the car roll even after player jumps out
		
		local Unit = (DriveSeat.Position - Body.Seats.SeatModule.Position).Unit
		plr.Character.HumanoidRootPart.CFrame = CFrame.new(DriveSeat.Position - Unit * 10)
        -- This will make the player 'teleport' to their side of the car
		
		KillEngine:InvokeServer(Car)
		func2:Disconnect()
	end)

--serverscript
KillEngineEvent.OnServerInvoke = function(Plr, Car)
	if not Car.Body.Seats.DriveSeat.Occupant == Plr.Character.Humanoid then return end
	
	for i ,v in pairs(Car.Constraints.Temp:GetChildren()) do
		v.Enabled = true
		
		local Rim = v.Part1
		Rim.CanCollide = true
		Rim.Tire.CanCollide = true
	end --Welds the wheels to the car so they don't move around, They're also can-collide so the car can rest on the surface
	
	for i, v in pairs(Plr.Character:GetChildren()) do
		if v:IsA('BasePart') then
			PhysicsService:SetPartCollisionGroup(v, 'Default')
		end
	end --Allows the previous driver to collide with the car again.
end

This is what it looks like: https://gyazo.com/31b11851003e8919379c20e83bf89609
I’m not sure if i missed something and I’ve tried debugging everything shown to no avail, Let me know if you’ve any ideas

1 Like