How do i make a part just move forward a certain amount of studs in its direction

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    -Make a part move forward in one direction a certain amount
  2. What is the issue? Include screenshots / videos if possible!
    -Can’t get a part to move X studs in one direction
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    -Messing with trigonometry
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

basically, i have a script to make a part point in direction and then expand until it touches a certain block, but then i was gonna make it half the size after, then move it forward halfway of its size, i just need the move forward script

If it needs to move in the direction it’s facing just do

Vector3.one * Amount * part.CFrame.lookVector

You can change look vector to be right Vector or add in a minus to get the opposite side.

I do
part.Position + part.CFrame.LookVector * amount

so i set the parts position to this?

1 Like

yeah
part.Position = part.Position + part.CFrame.LookVector * amount

Or you could just
part.Position += part.CFrame.LookVector * amount

Bro please watch this before doing anything else.

1 Like

that video doesnt have anything to do with scripting but ok, also i think i know how to rotate my camera and create a place

That’s a playlist.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.