How do I stop an object from going offscreen?

isk2837

Member
Licensed User
Longtime User
I'm designing code that will cause a bat to move left and right when a button is pressed. Basically it adds or takes away from the bat's Left value. I want to make it so that the bat won't be able to go offscreen, but how do I do that?
 
Top