keepGoing = True
while keepGoing:
score+=1
myfont = pygame.font.SysFont("monospace", 15)
label = myfont.render(str(score), 1, (255,255,0))
screen.blit(label, (100, 100))
This is my code but when I run the program it increases score properly - but when outputting it to the screen it doesn't take previous digit off, so when it prints 1 on the screen and then a 2 the 1 doesn't erase the 2 shows write on top of it. Because of this after a while I just get a yellow block on the screen.