Tweened GUI is inconsistent across devices

I’m trying to tween a Frame so that it ends up on the very edge of the screen like this:


This is on a 1920x1080 device preview.

However since I’m using a laptop, this is where it ends up tweening.

I’ve heard people suggest changing AnchorPoints and UIAspectRatioConstraints and I’ve tried playing around with them, but I’m still mostly unclear on what they do and how they affect the tweening behavior across different devices.

You could try to change its anchor point to Vector2.new(0,1) and position to UDim2.new(1,10,1,-10). When closing the menu, you could tween the anchor point to Vector2.new(1,1) and position to UDim2.new(0,0,1,0). It’s better to encase the menu contents in a frame first.

AnchorPoint is basically the point where you press your finger on a paper on a table. Rotating it would rotate it around your finger and moving it moves it around your finger. UDim2 values look like this: (scaleX, offset_pixelX, scaleY, offset_pixelY). The scale value is just the percentage of pixels, for example an X scale of 0.75 in a screen width of 1280 would do something like 1280*0.75, which results in 960 pixels which could be its offset_positionX or offset_sizeX.

Are you tweening offset or scale? It should tween fine across all devices if you are tweening scale.

I’m tweening the scale.

try changing the easing style in in.

iirc setting the anchor point to something like (1, 0)

then the final position to (0, 0, yScale, 0) will guarantee it to go off screen.

EasingStyle In for both of the tweens?

Nevermind, looks like I fixed it. I had to keep the position scale the same but only change the offset when tweening. Thanks for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.