Setting bounds for an mc (using pixels...y = 300 etc)

What I wanted to know is how I would be able to make it so that a certain mc could go no higher than say 300 pixels vertically. I know there’s a way to limit movement that way but I’m not sure how to put it. My scenario is basically this: I have a character which is moved with the arrow keys, he has vertical and horizontal movement but I don’t want him to be able to go any higher than about 300 otherwise it looks like he’s walking on the walls :P.

Thanks,

Fargate :thumb: