Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Ending IF Statements problem?

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

✓ Accepted answer

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

1 comment

0

Also it's better to use Destroy() than it is to use Remove()

This discussion is preserved as it was. New answers, comments, and votes are closed.