When I copy this zombie from lighting into the workspace, for some reason it spawns dead.
print("spawning")
local monster = game.Lighting.Monsters:findFirstChild(Monss[num]):Clone()
local spawn = activespawns:GetChildren()[math.random(1, #activespawns:GetChildren())]
monster.Health.Value = math.floor((((monster.Health.Value*rnd)-50)^2)*.0022)
monster.Humanoid.MaxHealth = monster.Health.Value
monster.Parent = game.Workspace
monster.Humanoid.Health = monster.Health.Value
print("Health "..monster.Humanoid.Health) -- "5"
monster.Torso.CFrame = CFrame.new(spawn.Position) -- "Spawn"
print("Health "..monster.Humanoid.Health) -- still "5"
monster.Kill.Disabled = false
monster.Main.Disabled = false
monster.Sounds.Disabled = false
monster.Death.Disabled = false
Mons[num] = Mons[num] - 1
print("monster stuff")
--**monster dies right after this
Is it because I have "zarm1" and "zarm2" in the zombie instead of Left and Right Arm? Should I be using a different teleport function like MoveTo? This code is making me ugh because I don't see why it shouldn't work. |