Updating to LinearVelocity and AngularVelocity

I have this script for a jetski from back when BodyThrust and such were a thing, but now that they’re deprecated, I need some help converting my script to the new system. If someone could help me out with changing the BodyThrust and BodyAngularVelocity to LinearVelocity and AngularVelocity, that would be appreciated. I’m not sure how the new systems work.

local Engine = script.Parent.Parent.Engine.BodyThrust
local SForce = script.Parent.Parent.Steering.BodyAngularVelocity
local DSeat = script.Parent.Parent.VehicleSeat
local Base = script.Parent.Parent.Color

speed = 13000
SteerSpeed = 1.5
BaseDensity = .01

DSeat.Changed:Connect(function(p)
	if p == "ThrottleFloat" then
		Engine.Force = Vector3.new(0,0,speed * DSeat.ThrottleFloat)
		
	end
	if p == "SteerFloat" then
		SForce.AngularVelocity = Vector3.new(0,-SteerSpeed*DSeat.SteerFloat,0)
	end
end)

Base.CustomPhysicalProperties = PhysicalProperties.new(BaseDensity,0,0)

It is difficult to know what you expected, since I cant find the legacy stuff you used. Perhaps it was removed. I’ll just guess.

I have never worked with vehicle seats before. It was a learning experience. I ignored the part in the “Base” variable. (I think it was intended to be visual only.) The script I made goes by itself in a vehicle seat. I hope my script works for you. You will probably need to adjust the numbers.

DSeat.Changed:Connect(function(p) can work for steering, but not acceleration. This is because it only triggers on press and release. I just moved it all to RunService.Heartbeat:Connect(function() instead.

local RunService = game:GetService("RunService")
local DSeat = script.Parent
local Attachment = Instance.new("Attachment")
local LV_Engine = Instance.new("LinearVelocity")
local AV_SForce = Instance.new("AngularVelocity")

Attachment.Parent = DSeat
LV_Engine.Attachment0 = Attachment
AV_SForce.Attachment0 = Attachment
LV_Engine.MaxForce = 10000
AV_SForce.MaxTorque = 10000
LV_Engine.Parent = DSeat
AV_SForce.Parent = DSeat

speed = 30
SteerSpeed = 1.5

RunService.Heartbeat:Connect(function()
	LV_Engine.VectorVelocity = DSeat.CFrame:VectorToWorldSpace(Vector3.new(0,0,-speed * DSeat.ThrottleFloat))
	
	-- right turns left when going backward (like a car)
	AV_SForce.AngularVelocity = Vector3.new(0,-SteerSpeed*DSeat.SteerFloat*math.sign(DSeat.ThrottleFloat),0)
	
	-- right always turns right, going forward or backward
	--AV_SForce.AngularVelocity = Vector3.new(0,-SteerSpeed*DSeat.SteerFloat,0)
end)