so im trying to make a key open a GUI but it doesnt seem to work.
here is the code:
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input)
if input == Enum.KeyCode.C then
if script.Open.Value == false then
script.Parent.Parent.BagGUI.Visible = true
elseif script.Open.Value == true then
script.Parent.Parent.BagGUI.Visible = false
script.Open.Value = false
end
end
end)