How to set a gravity effect in your Scratch game
Assuming you have a 2D platform-type game that has a clear up and down.
You will need to design a level that has platforms, in my example I will use the colour black for my platforms.
Then you need to code a script that will continuously subtract values from the Sprite's y position when not touching a platform (the y value is the Sprite's vertical position on the Stage, the x value controls the Sprite's horizontal position on the Stage).
If you use a different colour for your platforms, you will need to specify that in your script.