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

how do i disable these two GUIs?

Asked by 4 years ago

basically this code is meant to disable some GUI, it works, but Inventory And DInventory Do Not Get Disabled.

        for i,v in pairs (game.Players:GetChildren()) do
            v.Team = game.Teams.Survivors
            local machinegui = v.PlayerGui:WaitForChild('Machines')
            machinegui.Enabled = true
            local ib = v.PlayerGui:WaitForChild('InventoryButton')
            ib.Enabled = false
            local dib = v.PlayerGui:WaitForChild('DInventoryButton')
            dib.Enabled = false
            local i = v.PlayerGui:WaitForChild('Inventory')
            i.Enabled = false
            local di = v.PlayerGui:WaitForChild('DInventory')
            di.Enabled = false
            local s = v.PlayerGui:WaitForChild('RobuxShop')
            s.Enabled = false
        end
0
i forgot to mention that Inventory and DInventory have a UIGridLayout Inside Of Them. TheEnderG 7 — 4y
0
This must work, for some reason I don't know why. Re-try Gabe_elvin1226aclan 323 — 4y
0
@Gabe_elvin1226aclan it just doesn't seem to be disabled, it's so odd, like what am i supposed to do? is it a problem with roblox or something? TheEnderG 7 — 4y
0
Is this a LocalScript or Script User#30567 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Use .Visible instead of .Enabled. Enabled isn't a real thing, and therefore you shouldn't use it.

Ad

Answer this question