My script is supposed to load a player’s plot and the objects position and orientation. Everything works but when the new orientation is calculated with the plot’s cframe it doesn’t have the same orientation as when it originally saved. The multiplying is intended to make it so your objects can be orientated correctly on every plot but it seems to not calculate correctly
--The loading part (not the entire thing but what is relevant
local NewCframe = Plot.CFrame * CFrame.new(data.CFrames.X, data.CFrames.Y, data.CFrames.Z) * CFrame.Angles(0, math.rad(data.CFrames.Orientation), 0)
serializedModel:SetPrimaryPartCFrame(NewCframe)
--The saving part and the stuff that's relevant
X = Plot.CFrame:ToObjectSpace(CFrame.new(Obj.PrimaryPart.CFrame.p)).X,
Y = Plot.CFrame:ToObjectSpace(CFrame.new(Obj.PrimaryPart.CFrame.p)).Y,
Z = Plot.CFrame:ToObjectSpace(CFrame.new(Obj.PrimaryPart.CFrame.p)).Z,
Orientation = Obj.PrimaryPart.Orientation.Y;}