Unable to rotate a model

Hi, I’m trying to spawn in, position and rotate a model, I’m able to position it fine but I cannot rotate it for some reason using SetPrimaryPartCFrame, and yes, I do have a PrimaryPart set.
image

Here is my code:

	local base = workspace.Bases:FindFirstChild("Base"..PlayerNum)
	local floor = base.BaseFloor
	local centerpart = floor:FindFirstChild("CenterPart")
	local test = game.ServerStorage.TycoonAssets.AutoSpawns.DropperHolder:Clone()
	local isEven;
	if PlayerNum % 2 == 0 then
		isEven = true
	end
	
	local newpos = CFrame.new(centerpart.Position.X + 0.35, centerpart.Position.Y, centerpart.Position.Z - 1.5)
	test.Parent = base
	test:PivotTo(newpos)

	--if isEven == true then
		test:SetPrimaryPartCFrame(test.CFrame * CFrame.Angles(0, 0, math.rad(90)))
	--end

No errors, here is a video of it not being rotated.

1 Like

I think your issue lies here on this line.

The model does not have a CFrame property as in model.CFrame. Instead, to get the PrimaryPart/Origin CFrame of the model you need to use model:GetPivot() -> CFrame. E.g model:GetPivot() * CFrame.Angles…

1 Like