Why are my npcs not spawning on each individual part?
Asked by
5 years ago Edited 5 years ago
Hello, i created a script that i duplicated to each part, it is a spawner script for npc's. The issue is, they dont spawn on the parts, but on a random point all together. Added comments to explain some things.
01 | local spawner = script.Parent |
02 | local human = game.ServerStorage.Enemies.Zombie |
03 | game.Workspace.Part 1. Touched:Wait() |
05 | local Clone = human:Clone() |
06 | Clone.UpperTorso.CFrame = spawner.CFrame |
07 | Clone.Parent = workspace |
10 | game.Workspace.Iteration.Value = game.Workspace.Iteration.Value + 0.1 |