I made a game round script, it works and stuff, but when the part deletion ends, the script just stops? I don’t know how to fix it, and I can’t find any posts. Help is appreciated!
for count = 1, #Map:GetChildren() do
timer = tonumber(#Map:GetChildren())
timer -= 1
Status.Value = "Round Time left: "..timer
local ChildrenOfModel = Map:GetChildren()
PartToDelete = ChildrenOfModel[math.random(#ChildrenOfModel)]
if PartToDelete.Name == "LandPart" then
PartToDelete.Material = Enum.Material.Neon
PartToDelete.BrickColor = BrickColor.new("Really red")
wait(1)
PartToDelete:Destroy()
else
repeat wait()
PartToDelete = ChildrenOfModel[math.random(#ChildrenOfModel)]
if PartToDelete.Name == "LandPart" then
PartToDelete.Material = Enum.Material.Neon
PartToDelete.BrickColor = BrickColor.new("Really red")
wait(1)
PartToDelete:Destroy()
end
until PartToDelete.Name == "LandPart"
end -- Where I think the script stops
end
wait(1)
print("script didnt stop")
end