When i run the script it comes up with "Model:SetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this. - Server - Script:7". I Have no idea how to fix this, any help ?
_G.deadzombies = 0
local ServerStorage = game:getService("ServerStorage")
local Zombie = ServerStorage:WaitForChild("Zombie")
local newZombie = Zombie:Clone()
newZombie:SetPrimaryPartCFrame(CFrame.new(10,10,10))
newZombie.Parent = game.Workspace.Zombiez
while wait(1) do
if #game.Workspace.Zombiez:GetChildren() == 0 then
for i = 0, _G.deadZombies, 1 do
print("looping")
local newZombie = Zombie:Clone()
local myCFrame = game.Players.LocalPlaye
newZombie:SetPrimaryPartCFrame(CFrame.new(math.random(1,100),10,math.random(1,100)))
newZombie.Parent = game.Workspace.Zombiez
end
end
end
