Looking at the code, I think the problem could be that the line under if Input.is_action_pressed(“ui_down”): is not indented. This will cause an error since every if, elif or else statement needs at least one line of indented code so it knows what to if the condition is true.
Another thing that could potentially be causing the problem is mixing tabs and spaces in your code. If you are using both tabs and spaces, I would suggest convering one so it is consistent across the code base. I think there is a button in the script editor for converting to and from spaces and tabs that may be able to help if you are using both.
Hopefully this helps :smile:
(Just as an FYI, I edited your post so the code was formatted correctly. All I did was indent your code by a single tab so it renders as the code properly in your post)