This block of code looks like it's presenting the problem:
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
elderly.moveup()
if event.key == pygame.K_DOWN:
elderly.movedown()
if event.key == pygame.K_RIGHT:
elderly.moveright()
if event.key == pygame.K.LEFT:
elderly.moveleft()
elif event.type == pygame.KEYUP:
if event.key == pygame.K_UP or event.key == pygame.K_DOWN or event.key == pygame.K_RIGHT or event.key == pygame.K_LEFT:
elderly.movepos = [0,0]
elderly.state = "still"
If you take another look at your Elderly class, it doesn't have any methods defined called moveright(), moveleft(), moveup(), or movedown(), or properties called movepos or state for that matter either!
So you'll need to define them in your Elderly class.
e.g.
inside your definition of Elderly you need to define the moveup function (and the other missing functions like this):
def moveup():
#TODO: add code to move your elder upwards
def movedown():
#TODO: add code to move your elder downwards
# etc etc.....
You should also add and initialise the missing properties (movepos and state) in the __init__ function for the Elderly class!
Give that a go and let us know how you get on!
Cheers for now,
Jas.