self.image5 = pygame.transform.scale(gunspritel, (120, 120)) self.image6 = pygame.transform.scale(gunspriteu, (55, 120)) gunspritel = pygame.image.load('guy shoot left.png') gunspriteu = pygame.image.load('guy shoot up.png') self.image2 = pygame.transform.scale(idle, (120, 120)) self.image3 = pygame.transform.scale(gunspriter, (85, 120)) self.image4 = pygame.transform.scale(gunspriteb, (60, 120)) self.rect = self.image2.get_rect() self.rect = self.image3.get_rect() self.rect = self.image4.get_rect() if key[pygame.K_RIGHT]: if key[pygame.K_DOWN]: self.image = self.image4 thisprite = 2 if key[pygame.K_UP]: self.image = self.image4 thisprite = 3 if key[pygame.K_LEFT]: self.image = self.image4 thisprite = 4 idle = pygame.image.load('main man.png') gunspriter = pygame.image.load('guy shoot right.png') gunspriteb = pygame.image.load('guy shoot below.png')