Bounceoff command just pushes ball

What I expect to happen: student wants the soccer player to have the ball bounce off each soccer player.
What actually happens: the player just pushes the ball
What I’ve tried: moved command around. tried using different sprites to check commands and get the same result.

Can you make the link shareable? Since I can’t access the link.

var backGround = createSprite(200, 200);
backGround.setAnimation(“sports_scoccer_1”);
var player = createSprite(200, 350);
player.setAnimation(“Screenshot 2023-01-18 8.54.04 AM.png_1”);
player.scale = 0.1;
var player2 = createSprite(192, 75);
player2.setAnimation(“Screenshot 2023-01-18 8.53.21 AM.png_1”);
player2.scale = 0.1;
var ball = createSprite(200, 200);
ball.setAnimation(“golfball_1”);
ball.scale = 0.05;
var redscore = 0;
var bluescore = 0;
player.debug = true;
ball.debug = true;
ball.setCollider(“circle”);
player.setCollider(“rectangle”);
function draw() {
if (keyDown(“up”)) {
player.y = player.y - 10;
}
if (keyDown(“down”)) {
player.y = player.y + 10;
}
if (keyDown(“right”)) {
player.x = player.x + 10;
}
if (keyDown(“left”)) {
player.x = player.x - 10;
}
if (keyDown(“w”)) {
player2.y = player2.y - 10;
}
if (keyDown(“s”)) {
player2.y = player2.y + 10;
}
if (keyDown(“a”)) {
player2.x = player2.x - 10;
}
if (keyDown(“d”)) {
player2.x = player2.x + 10;
}
if (ball.x >= 140 && ball.x <= 250 && ball.y <= 30) {
ball.x = 200;
ball.y = 200;
bluescore = bluescore + 1;
}
if (ball.x >= 136 && ball.x <= 253 && ball.y >= 360) {
ball.x = 200;
ball.y = 200;
redscore = redscore + 1;
}
drawSprites();
ball.bounceOff(player);
ball.bounceOff(player2);
showscore();

}
function showscore() {
fill(“white”);
textSize(20);
text("Score: " , 12, 385);
text(bluescore, 80, 385);
fill(“white”);
textSize(20);
text("Score: " , 12, 40);
text(redscore, 80, 40);
}

I mean for the link and not the code so that I can remix it and edit it.
Sorry if I’m acting troublesome to you.

Sorry, I shared the only link I have access to above, I posted the entire code. Can’t you just paste and edit? Send it back the same way.
Thank you for trying.

Hi @eric.mcmahon,

Because the sprites are not in the project when we copy paste the code, GameLab won’t let us interact and debug the code. If you take a look at these instructions, it will show you how to share student projects to make it easier to debug. We’ll keep trying with what you have sent but it would be easier if you made the project sharable and then let us know.

~Michelle

@eric.mcmahon -

I can’t tell how the ball is moving. The bounceOff requires that the sprite has constant movement. If you look at the documentation for bounceOff, the apple has velocityX and velocityY so it has constant motion. Try changing movement from the counter pattern for x and y for the ball to velocityX and velocityY and see if that helps. Just a guess:) If that doesn’t fix it, it would really help to have a share link to the project:) Good luck!
~Michelle