i just need a little code to check if my "GegnerStorage" folder is empty.
i tried this but it didnt work.
if game.workspace.GegnerStorage == nil then
status.Value = "You Won!"
break
i just need a little code to check if my "GegnerStorage" folder is empty.
i tried this but it didnt work.
if game.workspace.GegnerStorage == nil then
status.Value = "You Won!"
break
Well if the folder is empty, it would still exist. You just need to check the number of children it has inside (0 if it's empty).
GetChildren returns a list of all the children, and the # operator will tell you the number of items in a list. So you can just check if #GegnerStorage:GetChildren() equals 0.
Thanks very much! works now
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Try #game.workspace.GegnerStorage:GetChildren() == 0 then