When the key b is pressed I want the Gui to become visible but its not working.
Script is in Backpack
local Player = script.Parent.Parent
local Mouse = Player:GetMouse()
function onKeyDown(key)
key = key:lower()
if key == "b" then
Player.PlayerGui.Guide.Frame.Visible = true
end
end
Mouse.KeyDown:connect(onKeyDown)

3 comments
Is it a LocalScript?
Yes
Try setting the variable 'Player' to: game.Players.LocalPlayer