Hi! Hope your having a good day!
I am trying to delete all of the blocks that are in this folder, however it only deletes like 90% of it. The rest don’t get deleted and I do not know why. There are no errors, it just doesn’t delete! If someone could figure out why this is happening, that would be greatly appreciated!
Thanks!
Here is my code:
--Server script in SSS (ServerScriptService)
Status.Value = "End of game!"
task.wait(2)
for i,player in pairs(game.Players:GetPlayers()) do
local charac = player.Character
if not charac then
print("Player does not have character!")
elseif charac then
if charac:FindFirstChild("GameTag") then
charac.GameTag:Destroy()
player:LoadCharacter()
end
end
end
for i,v in pairs(workspace.StepsFolder:GetChildren()) do
if v.Name == "Step" then
v:Destroy()
end
end
ClonedMap:Destroy()
workspace.Lobby.Construction.SurfaceGui.TextLabel.Text = "0"
workspace.Lobby.Radioactive.SurfaceGui.TextLabel.Text = "0"
workspace.Lobby.City.SurfaceGui.TextLabel.Text = "0"
Timer.Value = 180
task.wait(3)
--END OF GAME ENDING
Along with a picture before and after deletion;
Before:
After:
In the game:
The purple blocks are the steps by the way.