Why is my Gui not appearing when I click this button?

It’s still not working, could you maybe join the game and help in the game?

Is there any errors in the console? Me joining the game wouldn’t help too much unless you meant in studio

Yeah I meant in Roblox studio.

I don’t work with GUIs much, but you should probably use WaitForChild instead of FindFirstChild. Also, (I’m not really sure about this) try enabling Visible as well

local InventoryButton = script.Parent.Frame.Inventory
local Inventory = script.Parent.Parent.InventoryGui

InventoryButton.MouseButton1Click:Connect(function()
	task.wait()
	script.Parent.Frame:Destroy()
	Inventory.Visible = true
end)

I think this is what you’re trying to achieve.

GUI in the roblox engine is very weird.

Don’t reference a GUI via the game path, just use script.Parent.Parent blah blah because you need to edit the GUI in the user’s PlayerGui, not the Global GUI inside of StarterGui.

I found out how to do it, here is the script image

1 Like