Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my NPC respawn script not stopping when I tell it to?

Asked by 5 years ago

I want it to spawn npc's while the text label says "Game", but when it says "Intermission", I want the zombies to stop spawning

If anyone can help I would really appreciate it! Thanks!

~~~~~~~~~~~~~~~~~ local NPC = game.ReplicatedStorage.Zombie local spawner = script.Parent GameTime = game.StarterGui.Timer.Frame.TextLabel

if GameTime.Text == "Game" then repeat local Clone = NPC:Clone() Clone.Torso.CFrame = spawner.CFrame Clone.Parent = workspace wait(2) until GameTime.Text == "Intermission" end ~~~~~~~~~~~~~~~~

Answer this question