im trying to make a keybind for a gui leaderboard but i get this error message:
PlayerGui.ScreenGui.Frame.LocalScript:10: attempt to index nil with 'keyCode'
Here is the script please help
function PopupGui() if script.Parent.Visible==true then script.Parent.Visible=false else script.Parent.Visible=true end end
game:GetService("UserInputService").InputBegan:Connect(function(key) if Key.KeyCode==Enum.KeyCode.Tab then popupGui() end end)
