How can i make all npc's wait to respawn when all have died?
Asked by
5 years ago Edited 5 years ago
Hello, ive been trying to make a script for that npc's will wait to respawn until all have died.
This is what i have so far...
04 | human.Humanoid.Died:Wait() |
05 | if game.Workspace.Lives.Value < 10 then |
07 | elseif game.Workspace.Lives.Value = = 10 then |
08 | clone.Parent = game.Workspace |
10 | script.Parent.Humanoid.Deaths.Value = script.Parent.Humanoid.Deaths.Value * 1.25 |
11 | print (script.Parent.Humanoid.Deaths.Value) |
12 | script.Parent.Humanoid.MaxHealth = script.Parent.Humanoid.Deaths.Value * script.Parent.Humanoid.MaxHealth |
13 | script.Parent.Humanoid.Health = script.Parent.Humanoid.MaxHealth |
14 | game.Workspace.Lives.Value = game.Workspace.Lives.Value + 1 |
15 | print (game.Workspace.Lives.Value) |