So I’m currently making a moving platform by tweening it. However, if I rotate the platform, it will still move in the same direction. I want the platform to go forward in the direction of its front surface.
I’ve tried to add .lookVector or entirely use CFrame instead of Position but it wouldn’t work.
CFrames operate relative to the part’s rotation. Position = Part.Position + Part.CFrame.LookVector * Distance -- Positive Z Position = Part.Position + Part.CFrame.LookVector * -Distance -- Negative Z Position = Part.Position + Part.CFrame.RightVector * Distance -- Positive X Position = Part.Position + Part.CFrame.UpVector * Distance -- Positive Y
Or, better yet, CFrame = Part.CFrame * CFrame.new(X, Y, Z)
where X Y and Z are the directions (relative to rotation) that you want it to move.