Jump when touch something

Hello,
I’m making game like Doodle Jump, but I can’t make player jump when it touches the platform/ground.applyForce doesn’t work.Can you help to solve this please?

[lua]local function jumpForce( event )
if (player.y-player.height) == (ground1.y+ground1.height) then
player:applyForce( 0, 11111, player.x, player.y )
if (player.y-player.height) == (block.y+block.height) then
player:applyForce( 0, 11111, player.x, player.y )
end
end
end
player:addEventListener(“enterFrame”, jumpForce)[/lua]

Thanks! [import]uid: 49851 topic_id: 8850 reply_id: 308850[/import]

Solution:

[lua]local function jumpForce( event )
if math.abs(player.contentBounds.yMax - ground1.contentBounds.yMin) >= 1 then
– if (player.y+player.height) == ground1.y then
player:applyForce( 0, 11, player.x, player.y )
end
end
Runtime:addEventListener(“enterFrame”, jumpForce)[/lua]

THANKS to alestane and kam187osx! [import]uid: 49851 topic_id: 8850 reply_id: 32283[/import]