So I tried to find it but this is wrong I don't understand what event.pos
means from the place I found this code. When I click on the image it doesn't print "clicked" and this is because it thinks that the image starts at x and y 0...
I never used Stack Overflow so hope I get an answer.
if event.type == pygame.MOUSEBUTTONDOWN:
x,y=event.pos
if playbutton.get_rect().collidepoint(x, y):
print("clicked")