So... I tried using the lookVector for my boat, but for some reason, it only goes one way and doesn't change depending on where I'm (the vehicle seat is) looking. I tried using both BodyForce and BodyVelocity but nothing seems to work.
The script i used:
force = script.Parent.Parent.base.base.BodyVelocity look = script.Parent.CFrame.LookVector while true do if script.Parent.Throttle == 1 then force.Velocity = look * 8000 end if script.Parent.Throttle == 0 then force.Velocity = look * 0 end wait(0.1) end
I can't find any answer to why this happens. The script is inside a seat.
No they're not broken.
You're assuming that with line 2, the variable would update if the value is changed, but this isn't the case, once assigned to a value, it will be always be the same.
force = script.Parent.Parent.base.base.BodyVelocity part = script.Parent while true do if script.Parent.Throttle == 1 then force.Velocity = part.CFrame.LookVector * 8000 end if script.Parent.Throttle == 0 then force.Velocity = part.CFrame.LookVector * 0 end wait(0.1) end
If you have any questions/I made a typo/dumb mistake, just tell/ask!
Have a nice day