this is probably because the pet details frame is being positioned relative to the parent frame “PetFrame1”
the easiest way to see this is in action is by setting the position of the pet details to (0, 0, 0, 0) while it is inside of the pet frame, and when it is parented to the screen gui.
inside of the screen gui, it appears in the top left corner of the screen, while when it is parented to the pet frame it is in the top left of the frame instead.
the easiest way to fix this is by subtracting the mouse position by the parent frame’s position.
you should change every line where you change the position to: