All of the assets required can be downloaded here.
The sprites for the boxes are in the Traps --> Trampoline
Create any level you like.
In this level the CheckPoint cannot be reached.
You may copy my level layout.
Create a new scene for the Trampoline
Use an Area2D as the root node
Rename this to Trampoline
Add an AnimatedSprite2D as a child
Add a CollisionShape2D as a child
Select the AnimatedSprite2D node
In the Inspector find the Sprite Frames property
Click on SpriteFrames to open the frames
Rename the default animation to idle
Drag in the idle animation
Add a new animation called jump
Click the button to add frames from sprite sheet
Import the jump animation
from the Trampoline folder
Set the Horizontal frames to 8
Set the Vertical frames to 1
Now Select the idle frame
Then Select the CollisionShape2D
In the Inspector find the Shape property
Choose a New RectangleShape2D
Size it to fit around the Trampoline
Select the Trampoline node
Add a ready variable to the AnimatedSprite2D
So that we can play its animations
Select the Trampoline Node
Find the body_entered signal
Code the _on_body_entered function
Check if the body entering the trampoline is in the player group
Now check if the player is above the trampoline
since we do not want to trigger the trampoline from the sides
call the bounce function in the player script
play the jump animation of the trampoline
Select the AnimatedSprite2D node
Find the animation_finished() signal
When the jump animation is finished
Reset to the idle animation
This function receives a value
representing the upwards force
this force is then applied to the players y velocity
right-click the parent node
and choose Instantiate Child Scene
Selet the Trampoline Scene
Repeat for each trampoline you want in the level.
I added two trampolines to my level
I grouped them within a standard Node node
Which I renamed to Trampolines
Test the level and you should bounce off the trampolines when you jump on them from above