How to make frames in UIGridLayout fit exactly in a scrolling frame

Hi, I want to fit frames exactly into a scrolling frame. Right now I have a scrolling frame with a massive canvas size of,0,50,0) with a UIGridLayout of CellPadding ={0.05, 0},{0.002, 0}}, CellSize ={0.29, 0},{0.008, 0}}, it is very inefficient and I want to know how to make all the frames fit exactly in the frame

This is the game:

Btw I am talking about the main pet frame