I would like to change the origin orientation of a model only once.
For example I would use a while loop
local model = script.Parent
while true do
--Change the origin orientation of the model once
end
I would like to change the origin orientation of a model only once.
For example I would use a while loop
local model = script.Parent
while true do
--Change the origin orientation of the model once
end
You cannot change the origin orientation by assigning it a value.
Use PVInstance:PivotTo().
local model = script.Parent
-- Get the current pivot
local pivot = model:GetPivot()
-- Move the model forward 5 studs in the X direction
model:PivotTo(pivot * CFrame.new(5, 0, 0))
-- Move the model backward 5 studs in the Z direction
local pivot = model:GetPivot()
model:PivotTo(pivot * CFrame.new(0, 0, -5))
-- Rotate the model 90 degrees in the Y axis
-- Move the model backward 5 studs in the Z direction
local pivot = model:GetPivot()
model:PivotTo(pivot * CFrame.Angles(0, math.deg(90), 0))
You might also want to look at Understanding CFrame.