Ive been trying to get my npc's to clone onto a part but they wont .please someone tell me im stupid and help me...in that order
local ENEMY_COUNT = 25
local ServerStorage = game.ServerStorage
local function spawnEnemies(count)
local spawnpoint = workspace.enemyspawn.Size
for i = 1, count do
local enemy = ServerStorage.Enemies.Gladiator:Clone()
enemy.Parent = workspace.enemyspawn
local randomX = math.random(spawnpoint.X)
local randomZ = math.random(spawnpoint.Z)
enemy:MoveTo(Vector3.new(randomX , 10, randomZ))
end
end
wait(5)
spawnEnemies(ENEMY_COUNT)

1 comment
Let me know if you have any issues.