Setting speed to a boat

Hello, I’m trying to make a boat, but I can’t seem to move the boat as the set speed how can I fix this? The problem is whenever I set the torque ~10 it won’t move, but when I set the torque to like 100,000 it moves but the speed is like 9999.

Script:

local boat = script.Parent.Parent
local seat = boat.VehicleSeat
local main = boat.Main

seat:GetPropertyChangedSignal("Throttle"):Connect(function()
	main.BodyForce.Force = seat.CFrame.LookVector * seat.MaxSpeed * seat.Torque * seat.Throttle
	print(seat.MaxSpeed * seat.Torque * seat.Throttle) --Prints out as 250 25 * 10 * 1
end)

seat:GetPropertyChangedSignal("Steer"):Connect(function()
	main.AngularVelocity.AngularVelocity = Vector3.new(0, -1 * seat.TurnSpeed * seat.Steer , 0)
end)

Thank you.

Aren’t BodyMovers deprecated? I believe you should use VectorForce instead

Yes they are, but I researched Vector Force and didn’t really get it even reading the hub article.

Edit:
Sorry I might be afk for ~1 hour sorry.

this is not a solution to the topic, but

VectorForce works almost the same with BodyForce, but with VectorForce you can also choose which position of the BasePart should the Force be applied to (you won’t probably need rn).

All you need to set up VectorForce is add an attachment to the part, connect it to VectorForce and set it relative to world.

1 Like

Thank you I updated the script. Although I still need help.

I ended up fixing the script by using linear velocity instead though sometimes it still glitches.

local boat = script.Parent.Parent
local seat = boat.VehicleSeat
local main = boat.Main

seat.Changed:Connect(function()
	
	if seat.Steer then
		main.AngularVelocity.AngularVelocity = Vector3.new(0, -1 * seat.TurnSpeed * seat.Steer , 0)
	else
		main.AngularVelocity.AngularVelocity = Vector3.new(0,0,0)
	end
	
	
	if seat.Throttle ~= 0 then
		main.LinearVelocity.VectorVelocity = seat.CFrame.LookVector * seat.MaxSpeed * seat.Throttle
	else
		main.LinearVelocity.VectorVelocity = Vector3.new(0,0,0)
	end
	
end)
1 Like