I asked a similar question earlier on building support, cause this is kind of a physics-related question, but I figured asking this as a scripting question would fare better. The problem is whenever my car crashes into a fence or any wall, in particular, it just glitches through the fence/wall. How do I fix that? The car does collide with the wall, but it still glitches through.
Part of the script allowing the car to move:
runService:BindToRenderStep("Update", Enum.RenderPriority.Input.Value, function()
if inCar then
vehicle.PrimaryPart.CFrame = vehicle.PrimaryPart.CFrame + vehicle.PrimaryPart.CFrame.lookVector * moveSpeed
vehicle.PrimaryPart.CFrame = vehicle.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0, turnSpeed, 0)
end
end)