Checking backwards movement for car

        local carDirection = car:GetPivot():VectorToObjectSpace(carVelocity)

        if carDirection.Z < -5 then
            assignedCars[plr] = nil
            plr:LoadCharacter()
        end

This is my code at the moment, it works in some places, and doesn’t in others.

This video shows it, I’m going forward and it doesn’t flag it as backward for some time, but then later at a certain place it does.

I’d like to emphasise that by backwards movement, I don’t just mean reverse, I also mean the car facing backwards. And checking Y orientation does not work, as shown in the video.

1 Like

Try this.

local carDirection = car:GetPivot():VectorToObjectSpace(carVelocity)

if carDirection.Z > 0 then
     assignedCars[plr] = nil
     plr:LoadCharacter()
end
1 Like

The problem isn’t with this though.

As mentioned before, the code itself can work fine, but it doesn’t at a certain place.
If I did what you have just mentioned, then it wouldn’t allow me to move forward in some places.

Bumping this post, really need help on this one…