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)
local ENEMY_COUNT = 25 local ServerStorage = game:GetService('ServerStorage') local SpawnPoint = game:GetService('Workspace'):WaitForChild('enemyspawn') local enemies = ServerStorage:WaitForChild('Enemies') local gladiator = enemies:WaitForChild('Gladiator') local function spawnEnemies(count) for i = 1, count do local EnemyClone = gladiator:Clone() EnemyClone.Parent = SpawnPoint EnemyClone:MoveTo(SpawnPoint.Position) -- Enemy must be a model with a primary part end end spawnEnemies(ENEMY_COUNT)