Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a BodyVelocity's Velocity go to the direction the car's front is facing?

So i made a car, that is runned with a BodyVelocity and a BodyAngularVelocity. But if i turn, The bodyvelocity's velocity only goes in one direction. How can i fix this, and make the BodyVelocity go to the direction the car's front is facing?

script:

local s = script.Parent
local car = s.Parent
local stats = car.Base.Stats

local function changed(pro)
	if pro == "Throttle" then
		car.Base.BodyVelocity.Velocity = Vector3.new(0,0,stats.TopSpeed.Value) * s.Throttle
		car.Base.BodyVelocity.MaxForce = Vector3.new(0,0,stats.Acceleration.Value)* 3000 * s.Throttle
	end
		if pro == "Steer" then
		car.Base.BodyAngularVelocity.AngularVelocity = Vector3.new(0,-stats.TurnSpeed.Value,0) * s.Steer
		end
		
end
s.Changed:Connect(changed)

3 comments

0

bump

0

That won't bump the question.

0

lmao

1 answer

I dont think "Body Velocity" is what you want.

Try using the "Body Thruster" instead

This discussion is preserved as it was. New answers, comments, and votes are closed.