Model not rotating past 90 degrees

I should clarify, the model CAN rotate past 90 degrees, however it never prints out any angle past 90 degrees. And never seems to be placed at an angle past 90 degrees.

When placing the model the angle of the primary part never exceeds 90 degrees with the angles getting weird between 90 and 270 degrees. Using print(math.deg(Y)), you can see the part’s angle reaches near 0 degrees after being flipped 180 degrees on its yaw, and when placed, it’s placed at an angle of near 0 degrees instead of 180. But why?
https://gyazo.com/b551abb220b4d2ec019fa577a93a7547

Local Script

local function ChangePos(pos, norm, FurnitureLocal, TurnNum)	-- Functions runs on mouse move
	if FurnitureLocal ~= nil then
		local endPos = pos + (norm * (FurnitureLocal.PrimaryPart.Size*.5)) 
		local endAngle = CFrame.fromEulerAnglesXYZ(0, math.rad(TurnNum), 0)
		FurnitureLocal:SetPrimaryPartCFrame(CFrame.new(endPos) * endAngle)
		local X,Y,Z = FurnitureLocal.PrimaryPart.CFrame:ToEulerAnglesXYZ()
		print(math.floor(math.deg(Y)))
	end
end

mouse.Button1Down:Connect(function()	-- Placing the item
	if CreatedFurnitureLocal ~= nil and CreatedFurnitureLocal then
		for i,v in pairs(FurnitureLocal:GetChildren()) do
			if v.Name ~= "GridPart" then
				v.CanCollide = true
			end
		end
		local X,Y,Z = FurnitureLocal.PrimaryPart.CFrame:ToEulerAnglesXYZ()
		print(math.floor(math.deg(Y)))
		ReplicatedStorage.FurniturePlacement:FireServer(FurnitureLocal, FurnitureLocal.PrimaryPart.Position, Y)
			
		CreatedFurnitureLocal = false
		FurnitureLocal = nil
		CurrentRot.Text = "Current Rotation: "
		KeyPressed = false
	end
end)

UserInputService.InputBegan:connect(function(InputObject, gameProcessedEvent)	-- UIS
	-- Rotate furniture
	if InputObject.KeyCode == Enum.KeyCode.R and not gameProcessedEvent then
		if FurnitureLocal ~= nil then
			if tonumber(RotationTextboxValue.Text) then
				if 0 < tonumber(RotationTextboxValue.Text) and tonumber(RotationTextboxValue.Text) <= 90 then
					RotationValue = tonumber(RotationTextboxValue.Text)
					TurnNum += RotationValue
					if TurnNum == 360 then
						TurnNum = 0
					elseif TurnNum == -360 then
						TurnNum = 0
					end
					CurrentRot.Text = "Current Rotation: " .. TurnNum
					ChangePos(pos, norm, FurnitureLocal, TurnNum)
				else
					RotationTextboxValue.Text = "Enter an appropriate number"
				end
			else
				RotationTextboxValue.Text = "Enter an appropriate number"
			end
		end
	end
end)

Server Script

ReplicatedStorage.FurniturePlacement.OnServerEvent:Connect(function(player, Furniture, Position, Y)
	for i, v in pairs(Furniture:GetChildren()) do
		if v.Name ~= "GridPart" then
			v.Transparency = 0
			v.CanCollide = true
		end
	end
	Furniture:SetPrimaryPartCFrame(CFrame.new(Position) * CFrame.fromEulerAnglesXYZ(0, Y, 0))  -- Copies the cframe from local script and replicates it on the server
end)

Could this potentially be the problem? Since you specify that the rotation must be less than or equal to 90, once you rotate it and update the RotationTextboxValue text to be greater then 90 it would no longer be able to rotate.

I tried your suggestion anyway by removing the comparison to no luck, it still has the same result like in the gyazo link.

Inside the ChangePos function:
local endAngle = CFrame.fromEulerAnglesXYZ(0, math.rad(TurnNum), 0)
Where the button was pressed:
local X,Y,Z = FurnitureLocal.PrimaryPart.CFrame:ToEulerAnglesXYZ()
When the RemoteEvent was fired:
Furniture:SetPrimaryPartCFrame(CFrame.new(Position) * CFrame.fromEulerAnglesXYZ(0, Y, 0))
Wasn’t the FurnitureLocal already in X,Y,Z? because inside the ChangePos function you changed the Orientation to X,Y,Z.

From what I gather, you’re suggesting me to use the rotation textbox value instead?
If so your suggestion actually worked ( I think), the part is rotating and being placed correctly, however its still not printing out any number past 90 degrees.