So I have a spawning mechanism that copies an NPC from ReplicatedStorage to the Workspace. It works, but the problem is that upon being moved, it instantly dies. How do I prevent this from happening?
Image of what happens AFTER it is moved
Code of the spawning:
local zambieBox = game.ReplicatedStorage.Zombies local zambie = zambieBox.grassPl0X local spawner = game.Workspace.grassSpawner local spawnPos = spawner.Position local roundStart = spawner.roundStatus local zambieCount = spawner.zambieCount local currentRound = spawner.currentRound function spawn() newZambie = zambie:Clone() newZambie.Parent = game.Workspace newZambie.Torso.Position = spawnPos newZambie.Humanoid.Health = 100 zambieCount.Value = zambieCount.Value + 1 end while roundStatus and zambieCount < 5*currentRound.Value do wait(4) spawn() end
Like TheAlphaStigma said, just add:
newZambie:MakeJoints()
To your spawn
function.