I have a surface gui pop up and then shrinks when you press e. It works the first time when i press e. So say I press e the first time and the gui pops up and then when i press e again it goes away. Then when i press e again it appears, but when i press e again then it doesnt go away... Help me please
mouse.KeyDown:connect(function(key)
if keyDeb == false then keyDeb = true
if key == "e" then
spawnScreen()
end
elseif keyDeb == true then keyDeb = false
wait(2)
closeScreen()
end
end)

1 comment
I found the problem anyways. There was no such thing as onKeyDown. My mistake. Also thanks for the new way to do it. Im an old coding junkie so im not used to this new stuff yet.