Hello. I am trying to have something set to where You press the space bar and the GUI goes away. But when I test it out on studio and press space bar it does nothing. Help?
function onkey(key)
if key == " " then
local frame = script.Parent
frame.Visible = false --making the frame and everything inside invisible
--I don't know how to make it fade, sorry!
end
end
script.Parent.KeyDown:connect(onkey)
