Model position doesn't change when I set it to a part

title fairly shows it, my model just refuses to move to the desired position I wish it for it to go to, I don’t understand why, and I’ve spent 15 minutes trying to fix this.

local Hat = Character:FindFirstChild(Currently_Being_Editted.Value.Name)
		local Handle = Hat.Handle
		local Weld = Handle.AccessoryWeld
		local Attachment = Handle.HatAttachment
		
		print(Handle)
		
		local NewModel = DragModel:Clone()
		NewModel.PrimaryPart = NewModel.HatReference
		NewModel.PrimaryPart.CFrame = CFrame.new(Handle.Position)
		NewModel.Parent = Character
		

help is greatly appreciated

Instead of directly setting the primary part’s CFrame, try making use of either :PivotTo(CFRAME), or :SetPrimaryPartCFrame(CFRAME) [Note that this one is deprecated]

:PivotTo is the better version of :SetPrimaryPartCFrame, so :SetPrimaryPartCFrame shouldn’t be used AT ALL

Thank you very much it worked.

Yeah, that’s why I specificied that setprimary is deprecated.

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