Placement system y rotation changing

Hello there! I’m currently working on a placement system, and I’ve ran into a problem where, when the part is rotated 135 degrees and I place it down. And then when I pick the part back up its rotation snaps to 45 degrees for no reason. Here’s a video for better understanding.
robloxapp-20231012-2322457.wmv (192.9 KB)
As you can see, when I pick up the part it snaps to 45 degrees rotation which isn’t supposed to happen.

I have a rotate function here below.

local function Rotate()
	if not object or not object:GetAttribute("Rotatable") then return end
	currentrot += ROTATION_SIZE
	print(currentrot)
end

And heres how im setting the position of the part

object:SetPrimaryPartCFrame(object.PrimaryPart.CFrame:Lerp(CFrame.new(cf.X, cf.Y, cf.Z) * CFrame.Angles(0, math.rad(currentrot), 0), lerpLevel)

When i re-pickup the part I’m getting the part that’s on my mouse and get the rotation property from it and save it. Then i re-run the placing function but right there it rotates the part back to 45 degrees.

Let me know if you need more information.
Any help is greatly appreciated!

1 Like