So....
I tried to make a part move on it's axis, not the worlds axis using a script and....
ERROR
Yes, I used CFrame... but I'm really bad at using lookVector, I know you do something with it... but what?
DO NOT POST A WIKI LINK TO CFRAME OR LOOKVECTOR WHICH DOESN'T GO ANYWHERE
No need to use lookVector.
01 | local function translate(part, x, y, z) |
02 | -- Multiplying two CFrames returns their composition. |
03 | -- Their rotations and THEN their positions are added. |
04 |
05 | part.CFrame = part.CFrame -- CFrame with part's rotation and position |
06 | * CFrame.new(x, y, z) -- CFrame with no rotation (offset) |
07 | end |
08 |
09 |
10 | translate(script.Parent, 2 , 0 , 0 ) |
1 | local function translate(part, x, y, z) |
2 | part.CFrame = part.CFrame * CFrame.new(x, y, z) |
3 | end |
4 |
5 |
6 | translate(workspace.Particual 2 , workspace.Particual.Position.X, workspace.Particual.Position.Y, workspace.Particual.Position.Z) |
And here's the list!
-> workspace -> Particual1 -> Particual2