Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you use lookVector to move a part?

Asked by 6 years ago

So if I want a part to move in the direction it is facing how would I do that? I'm not asking for a script but on how to use lookVector.

1 answer

Log in to vote
0
Answered by 6 years ago

I don't know if you would actually use lookVector in a situation like this. I only use lookVector for things like putting items in front of the player. To move an object the direction it's facing (if the script is in the object) you would do exactly this:

script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,0,-1)

and it will move 1 stud in the direction it's facing.

Ad

Answer this question