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

Applying Force to a lookVector?

I am not sure on how to apply the force to the lookVector of Car.Body.Body.FrontPart I am not sure if this is possible though.

elseif input.KeyCode == Enum.KeyCode.LeftShift then
	BodyForce = Instance.new('BodyForce', Car.Body.Body.FrontPart)
	BodyForce.Force = Vector3.new(Car.PrimaryPart.CFrame.lookVector*10000,0,0) --Not sure how I would set it up here.

1 answer

✓ Accepted answer

We aren't sure of your whole car situation but I can help with forces. Surely you know that Vector3.new(Car.PrimaryPart.CFrame.lookVector*10000,0,0) is incorrect? Vector3 only takes number arguments; lookVector is not a number. Infact there is no need to use Vector3.new() at all, since you already have a Vector3 in lookVector. This is likely what you want:

BodyForce.Force = Car.PrimaryPart.CFrame.lookVector*10000

AKA

Vector Arrow = Direction * Length

1 comment

0

I wonder why this got accepted if what I said, which was basically the same thing you said, didn't work. https://gyazo.com/34be484e4e76b9290a60ffcf0d624440.png

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