LocalScript:
local plr = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
plr.PlayerGui:FindFirstChild("InventoryGUI").OpenInventory.Activated:Connect(function()
if plr.PlayerGui:FindFirstChild("InventoryGUI").Inventory.Visible == false then
plr.PlayerGui:FindFirstChild("InventoryGUI").Inventory.Visible = true
else plr.PlayerGui:FindFirstChild("InventoryGUI").Inventory.Visible = false
end
end)
01:26:17.089 - Players.ArXe66.PlayerScripts.GUIScript:4: attempt to index a nil value
https://gyazo.com/fdf73eb9da959abb3522f3bfe07cc147
i am trying to make a script that opens and closes a GUI window.

3 comments
we cannot help if you do not explain what you are doing ???
if you have fixed it add [solved] to the title
speaking of the post not the problem