How can I move a part's position along its own axis from a script?

I am trying to move parts along their own axis. By pressing CTRL+L in studio you can move a part’s position locally. How could I do this from a script?

2 Likes

I don’t understand completly but you can use tweenservice to tween the part’s position just copy the its position and change the axis that you want to move and then it will just move in one axis

1 Like

I think this is what you want:

--offset is a Vector3 describing translation along the part's axis: (X, Y, Z)
somePart.CFrame = somePart.CFrame*CFrame.new(offset)

This will translate the part by a given Offset vector relative to itself.
I recommend giving this Article a read:

2 Likes