This is how my player moves:
if love.keyboard.isDown("right") then
player.x = player.x + player.speed * dt
end
if love.keyboard.isDown("left") then
player.x = player.x - player.speed * dt
end
I want to make it, so when the up or down button is pressed down, stop the player from moving.