Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » why cant the player jump when on a platform?
- ScratchDyder
-
Scratcher
32 posts
why cant the player jump when on a platform?
https://scratch.mit.edu/projects/727258781 the player cant jump while on a platform but on the floor it can perfectly fine
- legendary34678
-
Scratcher
1000+ posts
why cant the player jump when on a platform?
That's because falling is at 9 when you are touching the top of the platform. Since it's not 0, the player cannot jump. I would recommend checking out the Scratch Wiki's Platformer Tutorial for help regarding creating a platformer game.
- shadow_amalgam
-
Scratcher
70 posts
why cant the player jump when on a platform?
Delete these blocks first:

To this:

Hope this helps!
if <touching [ Top of platform] ?> thenThen change these blocks:
change y by (10)
set [ falling] to [9]
end

To this:

Hope this helps!
Last edited by shadow_amalgam (Sept. 2, 2022 20:38:55)
- ScratchDyder
-
Scratcher
32 posts
why cant the player jump when on a platform?
That's because falling is at 9 when you are touching the top of the platform. Since it's not 0, the player cannot jump. I would recommend checking out the Scratch Wiki's Platformer Tutorial for help regarding creating a platformer game.but when i set it to zero the player wont fall
- ScratchDyder
-
Scratcher
32 posts
why cant the player jump when on a platform?
Delete these blocks first:it works, but now it doesnt fall off the platform, how do i make it so that it falls off the platform too? thanks!if <touching [ Top of platform] ?> thenThen change these blocks
change y by (10)
set [ falling] to [9]
end
To this:
Hope this helps!
- Discussion Forums
- » Help with Scripts
-
» why cant the player jump when on a platform?