I think you should change the CFrame instead, they have all the functionality you need and more.
local model = script.Parent.Parent
local currentCF = model:GetPivot()
local newCF = currentCF * CFrame.Angles(0, math.rad(180), 0) -- Rotate by 180 deg around the Y axis
model:PivotTo(newCF)
(This can be done in fewer lines, I split it up to more lines to make it easier to follow)
Then you’d have to check if it has been rotated (either by storing that in a variable, or by checking it’s values). If it has been rotated, then rotate by 0 instead of 180.