Okay that's weird for me pressing space works just as intended. If you don't mind have you tried to reinstall the game? Otherwise there might be a problem with your computers keyboard.
Well I figured it out. Now my problem is the last level when you are supposed to fight Hagrid again. It lags so bad and then I die and am sent back to the first Hagrid boss level. Once I redid that again I was at the dog collect part at Hogwarts again.