my script is taking a screenshot of this image and trying to replace it corectly while cutting it in half ( i want to use it for a cool transition animation )
I ran a quick test using what you sent and the script snippet seems to be fine. Are you using CaptureService to take a screenshot inside the game or is this a pre-determined image? If the resolution of the image doesn’t match the screen that could be an issue.
Just move each side to it’s final destination equally then Tween to that position to make it smooth, after your done rearrange them to starting position.
If you don’t understand dm me on discord I’ll explain: imnotspider
On closer inspection, my bad, I see what you mean now.
CaptureService can capture(?) and display images at a different resolution than the screen, which breaks the math. And I don’t think there is a way to get the resolution of a temporary image, so the simplest and most likely the best fix is to ignore RectSize and RectOffset entirely and use 2 frames with ClipsDescendants to split the image instead.
im using captureservice, i will try to find what the resolution of roblox capture are, i will also try the clip descendants method, even if it was not really what i was looking for ( i might do a request to roblox for the capture service if thats the case )
There’s a method to get the size of a temporary screenshot but it’s restricted. If you have access to EditableImage, you can load the screenshot as one and get the Size.
I think @Cliosow’s solution is simpler and more accessible than dealing with pixel sizes.
HELLOROBBEROX8 has it, but you don’t need auto scale. Just do what that is doing yourself. You have two parts for each setting: scale and offset. In this case, you’re just looking for a full screen, so it would be (1, 0, 1, 0) : 100% width with 100% height. Using scale only will work on any screen.