Hello, I want to make a script that you can use to move and rotate a union so that it wil decrease the amount of position of the union on the x. here is what i have.
game.Workspace.Part.CFrame.x = game.Workspace.Part.CFrame.x - 4
Hello, I want to make a script that you can use to move and rotate a union so that it wil decrease the amount of position of the union on the x. here is what i have.
game.Workspace.Part.CFrame.x = game.Workspace.Part.CFrame.x - 4
Try:
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame + Vector3.new(-4, 0, 0)
This translates the CFrame by -4 on the x axis. When you use the + operator on a cframe, and provide a Vector3 it will "add" the vector3 to the CFrame.
Thank you I have found it also for the rotation so thanks
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
x, y, z values are read-only.