I can see in the debugger that the InventoryFrame is set to false, but nothing happens. InventoryFrame is a frame consisting of other frames. I will remember to accept a fulfilling answer
InventoryFrame = game.StarterGui.ToolBar.DisplayInventory.InventoryFrame
script.Parent.Activated:Connect(function()
if InventoryFrame.Visible == false then
InventoryFrame.Visible = true
else
InventoryFrame.Visible = false
end
end)

5 comments
InventoryFrame.Visible = not InventoryFrame.Visible is how you toggle a bool
Yes but there are other ways to do it smh ^
Yes, and ideally, a programmer should know all of them, and their relative merits. Toggle-by-assignment is a micro-optimization that won't matter one bit in this code, I only added the comment because it's something useful to know if you find yourself having to toggle a bool in a performance-critical nested loop.
Emily, nobody cares. The most annoying thing is when people criticize code for the wrong reasons lol, the logic works. And its not even that jank.
What even is the point of using = not? Half the time it doesn't even work, just use if enter bool here.Value/Visible = false/true.