This script spawns the character in a random location then all of a suddenly they started spawning dead.~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
local civN = script.CivilianN.Value while civN > 0 do civN = civN - 1 person = game.Lighting.People.Civilian:Clone() person:MakeJoints() person.Parent = game.Workspace end
Looks
Firstly, I am going to code block your code and make it readable.
1 | local civN = script.CivilianN.Value |
2 | while civN > 0 do |
3 | civN = civN - 1 |
4 | person = game.Lighting.People.Civilian:Clone() |
5 | person:MakeJoints() |
6 | person.Parent = game.Workspace |
7 | end |
The problem
You are making their joints before they have made it into workspace
Here is a fixed version
1 | local civN = script.CivilianN.Value |
2 | while civN > 0 do |
3 | civN = civN - 1 |
4 | person = game.Lighting.People.Civilian:Clone() |
5 | person.Parent = game.Workspace |
6 | person:MakeJoints() |
7 | end |
I hope this helped you