Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Ending IF Statements problem?

Asked by 8 years ago
game.Workspace.FilteringEnabled = true

if game.Workspace.FilteringEnabled == false then do
    game.Workspace.FilteringEnabled = true
    wait(1)
    if game.Workspace.FilteringEnabled == false then
        local Var = game.Workspace:GetChildren(Players)
        print (Var)
        wait(1)
        game.Workspace:GetChildren():Remove
    end
end

There is a problem in line 11

2 answers

Log in to vote
1
Answered by 8 years ago

You forgot the () at the end of :Remove

game.Workspace.FilteringEnabled = true

if game.Workspace.FilteringEnabled == false then
    game.Workspace.FilteringEnabled = true
    wait(1)
    if game.Workspace.FilteringEnabled == false then
        local Var = game.Workspace:GetChildren(Players)
        print (Var)
        wait(1)
        game.Workspace:GetChildren():Remove()
    end
end

0
Also it's better to use Destroy() than it is to use Remove() MrLonely1221 701 — 7y
Ad
Log in to vote
0
Answered by 8 years ago

Remove the 'do' after your first IF statement.

Answer this question