Heyy!
I have a problem, I want if there’s something in the file, then it says “Work”. But it doesn’t work: Why?
while true do
wait(0.1)
local Children = game.Workspace.InLobby:GetChildren()
local AmountOfChildren = #Children
if AmountOfChildren >= 1 then
print("Work")
wait(0.1)
end
end
If this is at the beginning of a script. Its possible it hasn’t loaded in yet.
Use
workspace:WaitForChild("InLobby"):GetChildren()
or
while true do
wait(0.1)
local Children = workspace:WaitForChild("InLobby"):GetChildren()
local AmountOfChildren = #Children
if AmountOfChildren >= 1 then
print("Work")
wait(0.1)
end
end