How to make ball physics like the game classic "Pong"?

Hello there,

I am currently making Pong inside of Roblox but the problem is that i don’t know how to correctly script the ball physics (ball bouncing on walls).

I tried raycasting but i don’t really know how i would do that and i tried doing it with values (because why not).
And yeah, i did look devforum but it confused me.

note : the ball is a part, not something from a GUI.

Split the ball’s velocity into two components. Whenever the ball collides with a horizontal wall multiply the vertical velocity component by -1. When it hits a vertical wall (or the ‘paddle’) reverse the horizontal velocity component.

5 Likes

Thanks for replying and for the help! :slight_smile: