How do i switch characters with arrows

I want to do this feature where if an arrow is red, then it switches to the boy. And if the arrow is a blue, then you can control the girl. But its not working for mobile. I have tried everything i could possibly know but still now working. Can someone help me or possibly show me how it should be? Sometimes when i tap the arrow, it reverts back to the previous color after 1 secs and sometimes it won’t even switch color.