Rotating Clone of model doesnt work

What i want to get:
Script Creates clone of model and puts it random position each 3 seconds , when putting it random position it also rotates it randomly in y axis

Issue is:
it does’t randomly rotates

local dummy = game.Workspace.Skeleton
local counter = script.counter
while true do
	wait()
	if counter.Value <= 6 then
		local randomizerx = math.random(49.375,102.5)
		local randomizerz = math.random(14.375,112)
		local randomizerx2 = math.random(-56.125,3.875)
		local randomizerz2 = math.random(42.875,112)
		local random123 = math.random(-180,180)
		wait(3)
		local clone = dummy:Clone()
		clone.Parent = game.Workspace
		clone.PrimaryPart.CFrame = CFrame.new(Vector3.new(randomizerx,5.727,randomizerz))
		clone.hitbox.CFrame = CFrame.new(Vector3.new(randomizerx,5.727,randomizerz))
		clone.PrimaryPart.Rotation = Vector3.new(0,random123,0)
		counter.Value = counter.Value + 1
	end
end

You might need to add a another loop inside of this loop if you want the model to be rotating after each iteration of the loop. From what I can tell, the model would automatically be “rotated” everytime it spawns in another location, so the player will not see it rotating

If that IS your intended behavior, instead of rotating the primarypart, you need to use set the model primarypart rotation instead of the primarypart itself so it moves the entire model.

p:SetPrimaryPartCFrame()