Can you make a it change x each time space kepressed

What Wick Editor Version are you using?
Ver: 19 (downloaded ver)

Describe the Problem
Trying to make a game on going side to side. But I need to change the speed (x) variable to change each time you press space

What have you tried so far?
I tried many hard things like changing the speed variable each time space is clicked but nothing worked!

that code should work so idk
btw send file so we can fix and send