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

how do i disable these two GUIs?

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

4 comments

0

i forgot to mention that Inventory and DInventory have a UIGridLayout Inside Of Them.

0

This must work, for some reason I don't know why. Re-try

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?

0

Is this a LocalScript or Script

1 answer

✓ Accepted answer

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

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