Basic programming question
I wanted to get advice as to why this program is not working. What I'm wanting is for the screen to change colour when I press space bar, which it does, however once you stop pressing space the screen reverts back to its original colour. The code I have is below
draw = function ()
screen.fillRect(0,0,400,200,-164)
if keyboard.SPACE then
screen.fillRect(0,0,400,200,-100)
end
end
Any ideas...