Need help with CFrame in script

When rotating PrimaryPart 180° then placed items appear still in one way so i need to replace or move CFrame in this script but to where?

SetPrimaryPartCFrame((House.Main.CFrame+All[A].Location.Value)*CFrame.Angles(math.rad(All[A].Angle.Value.X),math.rad(All[A].Angle.Value.Y),math.rad(All[A].Angle.Value.Z)))
2 Likes

Hi there, I know how to fix it. I’ll write and put code here, ok?

1 Like
while wait() do

local HouseCFrame = script.Parent.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(1), 0)

script.Parent:SetPrimaryPartCFrame(HouseCFrame)

end

I hope it will work.

2 Likes

Sorry for sending wrong script but this is the original script when loading items into house. But when i rotate primary part then Placed items appear original way. Can you somehow help change this in this script?

function LoadItems(PlayerName.HouseModel)
	if game.ReplicatedStorage.PlayerStats:FindFirstChild(PlayerName) then
		local All = game.ReplicatedStorage.PlayerStats:FindFirstChild(PlayerName).PlacedItems:GetChildren()
		for A = 1,#All do
			local NewItem = game.ReplicatedStorage.HouseStats.Items:FindFirstChild(All[A].Name):Clone()
			NewItem:SetPrimaryPartCFrame((HouseModel.Main.CFrame+All[A].Location.Value)*CFrame.Angles(math.rad(All[A].Angle.Value.X),math.rad(All[A].Angle.Value.Y),math.rad(All[A].Angle.Value.Z))) -- NEEDS CHANGING HERE
			NewItem.Stats.ID.Value = All[A].ID.Value