So basically when you click a button it will make these 2 GUIs appear. This is the code I put in the button but it doesn't work:
kickgui1 = game.StarterGui.GUIKick.Frameholder warngui1 = game.StarterGui.GUIWarn.Frameholder function onClicked(GUI) if kickgui1.Visible == false then kickgui1.Visible = true warngui1.Visible = true else warngui1.Visible = false kickgui1.Visible = false end end script.Parent.MouseButton1Click:connect(onClicked)
well, you have to use the player gui as the player gui is local to the player, which the starter gui isn't. I.E.
local plr = game.Player.LocalPlayer kickgui1 = plr:WaitForChild("PlayerGui").GUIKick.Frameholder warngui1 = plr:WaitForChild("PlayerGui").GUIWarn.Frameholder function onClicked(GUI) if kickgui1.Visible == false then kickgui1.Visible = true warngui1.Visible = true else warngui1.Visible = false kickgui1.Visible = false end end script.Parent.MouseButton1Click:Connect(onClicked)
while the starter gui is a child of the game object, the player gui is a child of the player object
I figured out how to fix it:
button = script.Parent window = button.Parent kickgui1 = window.Parent.Parent.GUIKick:FindFirstChild("Frameholder") warngui1 = window.Parent.Parent.GUIWarn:FindFirstChild("Frameholder") function onClicked(GUI) if kickgui1.Visible == false then kickgui1.Visible = true warngui1.Visible = true else warngui1.Visible = false kickgui1.Visible = false end end script.Parent.MouseButton1Click:Connect(onClicked)