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.

01for i,v in pairs (game.Players:GetChildren()) do
02    v.Team = game.Teams.Survivors
03    local machinegui = v.PlayerGui:WaitForChild('Machines')
04    machinegui.Enabled = true
05    local ib = v.PlayerGui:WaitForChild('InventoryButton')
06    ib.Enabled = false
07    local dib = v.PlayerGui:WaitForChild('DInventoryButton')
08    dib.Enabled = false
09    local i = v.PlayerGui:WaitForChild('Inventory')
10    i.Enabled = false
11    local di = v.PlayerGui:WaitForChild('DInventory')
12    di.Enabled = false
13    local s = v.PlayerGui:WaitForChild('RobuxShop')
14    s.Enabled = false
15end
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