Hey there,
Use an if statement - when the button is pressed if gravity is set one way, turn it the opposite way, elseif it’s set the other way then reverse it again.
Eg;
[lua]physics.setGravity(0, 9.81)
gravity = downward
function flipgravity (event)
if gravity == downward then
physics.setGravity(0, -9.81)
gravity = upward
elseif gravity == upward then
physics.setGravity(0, 9.81)
gravity = upward
end
end
yourbutton:addEventListener(“tap”, flipgravity)[/lua]
Hope that helps 
Peach [import]uid: 52491 topic_id: 9136 reply_id: 33399[/import]