Discuss Scratch

PoTigger
Scratcher
20 posts

Sprite Teleports Through the Ground Glitch

In my platformer game I have a very weird glitch where my sprite falls through the ground. It is very annoying and when I try dragging him up to the top he just goes back to the bottom of the screen. I have searched all of the scripts and have found nothing wrong. Please help this is preventing me from making my platformer. If you would like to see the game click this link: https://scratch.mit.edu/projects/87878467/#player
drmcw
Scratcher
1000+ posts

Sprite Teleports Through the Ground Glitch

Initialising things helps particularly the start position and the y velocity.
Ataxaos
Scratcher
500+ posts

Sprite Teleports Through the Ground Glitch

PoTigger wrote:

In my platformer game I have a very weird glitch where my sprite falls through the ground. It is very annoying and when I try dragging him up to the top he just goes back to the bottom of the screen. I have searched all of the scripts and have found nothing wrong. Please help this is preventing me from making my platformer. If you would like to see the game click this link: https://scratch.mit.edu/projects/87878467/#player
This is one of the most common problems when people try to make platformers - it happens when you forget to reset the velocity (especially the y-velocity, if your sprite keeps teleporting through the ground) at the start of the game/each level.

Make sure you have these blocks:
whenclickedsety velocityto0setx velocityto0gotox:0y:0whenIreceiveNext Levelsety velocityto0setx velocityto0gotox:0y:0
PoTigger
Scratcher
20 posts

Sprite Teleports Through the Ground Glitch

Thank you soooo much Ataxaos, this helped tons but I still have one problem. After the first level the sprite will not move. Please help me
Ataxaos
Scratcher
500+ posts

Sprite Teleports Through the Ground Glitch

PoTigger wrote:

Thank you soooo much Ataxaos, this helped tons but I still have one problem. After the first level the sprite will not move. Please help me
It's because your “sensor” sprite sets the variable “Can-Go” to 0.
I assume that the sensor is supposed to move with the sprite?
But right now, you didn't give it any movement scripts, so it just stays in one spot.
PoTigger
Scratcher
20 posts

Sprite Teleports Through the Ground Glitch

Oh! That was silly of me. I get it now, so thank you very much! My platformer should be working in proper order now thanks.
CodeRedTeacher
New Scratcher
2 posts

Sprite Teleports Through the Ground Glitch

my sprite keeps telaprting arond
scubajerry
Scratcher
1000+ posts

Sprite Teleports Through the Ground Glitch

CodeRedTeacher

You should start a new topic and also share your project and provide a link.

Powered by DjangoBB