Riding mowers can go up hills and mow the grass safely up and on hills however you just need to be really careful and drive the riding mower slower up the hills or when on the side of a hill when mowing the grass with the riding mower.
I use my riding mower for mowing up hills myself and have done so safely for many years now but I just drive the riding mower slower than I normally would and I'm very cautious.
So go slow and take your time so that you don't flip the mower back over on top of you or go rolling down the hill.
It's also best to lean forward to put some more of your weight towards the front of the riding mower when going up hills.
And when you're driving the riding mower on a slant on a hill you should lean your body weight towards the side of the hill on the riding mower to help prevent a roll over as it helps to keep more of your body weight uphill that helps to keep the mower down on the ground.