In StarterGui I have a ScreenGui called "KeyDownGui". In "KeyDownGui" I have a frame called "Box" and a LocalScript. Inside the LocalScript:
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
gui = script.Parent
box = gui.Box
Open = false
Mouse.KeyDown:connect(function(key)
if (key == "q") then
if(Open == false) then
box.Visible = true
Open = true
elseif (Open == true) then
box.Visible = false
Open = false
end
end
end)
I want to be able to press "q" to open the frame(Box) in-game, but in-game the frame does not open up, nothing happens! When I am in Roblox Studio and I go to "Test" at the top and then "Play" it works in there...! If yall would help w/ getting it to work NOT IN ROBLOX STUDIO, that would be awesome! Thanks!

1 comment
Is your hierarchy correct?