Hello, I'm having a little problem with priority of key presses

I’m making a CoSpace where you skate around; simple. I also want to add a third person camera for anyone who prefers that, and I’ve done so. I’m making it so that the camera moves around the axis of the skateboard to follow it, when A or D are pressed. These are also the keys for the skateboard to turn right and left. However, the key presses for the camera take priority, and the key presses for the skateboard don’t even work. I used a run parallel CoBlock but it didn’t work.

1 Like

I should also note that the W and S keys, for forward and backward movement of the board, take priority over the same inputs which are used for the camera. Turning the camera around the axis of the skateboard also does not seem to be working.

1 Like

Here’s the CoSpace.

1 Like

Here’s something I’ve been tinkering with, which sounds similar. You can remix to see how I achieved it. It’s not perfect, but it’s a start.

1 Like

Hi @ThatOneBGuy,

The latest event-handler for the same key always overwrites all previous event-handlers for this key.

In your example only the second time you use “When W is clicked” coblock is clicked. You can combine the code from them into one block and put run parallel inside of this block to achieve what you need. And repeat it for all 4 keys you are using


Thank you! I still can’t seem to be able to turn the camera on the axis of the skateboard, though; I want the camera to follow behind the skateboard as it moves, and stay in the same spot behind it even when a or d is pressed, but that isn’t going well. Thank you for your help!

You could attach camera to the board and control only board when A or D are pressed