# Applying force to forward vector doesn't work?

I’m tryna create a hoverboard

``````local VerticalOffset = math.sin(tick() * FREQUENCY) * AMPLITUDE
local RayTarget = Seat.Position + RayOffset + (Seat.AssemblyLinearVelocity * RAY_VELOCITY) + Vector3.new(0, VerticalOffset , 0)
local Result = workspace:Raycast(Seat.Position, RayTarget - Seat.Position, Params)
if Result then
local Magnitude = (Result.Position - RayTarget).Magnitude
VectorForce.Force = Vector3.new(0, MINIMUM_THRUST + Magnitude * THRUST, 0)
RayPart.BrickColor = BrickColor.Red()
RayPart.Position = Result.Position
else -- Does not collide
VectorForce.Force = Vector3.new(0, MINIMUM_THRUST, 0)
RayPart.BrickColor = BrickColor.Green()
RayPart.Position = RayTarget
end

local Velocity = Seat.CFrame:VectorToObjectSpace(Seat.AssemblyLinearVelocity)
if Velocity.Magnitude > 0 then
VectorForce.Force -= Velocity.Unit * (DRAG * Velocity.Magnitude ^ 2)
end

VectorForce.Force += (Seat.CFrame.LookVector * Seat.Throttle) * 50000
``````

When I press forward or backwards, it goes in all sorts of random directions

1 Like

The hoverboard is going the wrong way because maybe the seat is facing the wrong way?

Im checked, the seat faces the same direction may character is facing