How do you have a ball collide with a wall?

see the examples from Scott here https://groups.google.com/g/app-inventor-developers-library/search?q=bouncing%20ball
I did a search for bouncing ball

EDIT: and of course you always can do a search here in the community...
I found for example this thread for you

Taifun