im having a lot of trouble with this statement. I basically want it so when the wave reaches "2" a boss will spawn in. i have this coded so far
while wait do
if game.ReplicatedStorage.Values.Wave.Value == 2 then
game.ReplicatedStorage.BOSS.Zombie:Clone().Parent = game.Workspace
else
print("not in game")
wait(2)
end
end
but when the wave reaches round 2, it spawns in a bunch of the objects until the game crashes. im pretty new to scripting so how would i go about making it so it only spawns in 1 object every time the wave = 2?

3 comments
could you elaborate on this? im still new to scripting so i apologize
like false and true statements are in the unknown for me right now.. what would i set to false? like i see what you're saying but im not sure how i should write it out
There you go