Model does not rotate past 90 degrees on Y-axis

I am trying to rotate my model with model:PivotTo(). However, it doesn’t go past 90 degrees specifically on Y-axis.
The script:

local RunService = game:GetService("RunService")

local bigRing = script.Parent:WaitForChild("Ring")

RunService.Stepped:Connect(function(t, dt)
	local primPart = bigRing.PrimaryPart
	local rotation = primPart.Rotation
	local newCFrame =
	bigRing:PivotTo(newCFrame * 

I found this post but SetPrimaryPartCFrame is deprecated.

The Rotation property automatically normalizes its values so that theres only one value for every possible rotation. This means you can’t rely on it to keep track of one axis for more than 180 degrees. Separate the Y axis part like this:

CFrame.Angles(math.rad(rotation.X), 0, math.rad(rotation.Z)) * CFrame.fromAxisAngle(Vector3.yAxis, script:GetAttribute("speed")*10)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.