Hello, i’ve started making ui for my game. I wanted to spice up the close button for the ui so i made it something like pet simulator. I tried this Tutorial but theyre using uistroke for like half of the button wich isnt that good for small screens even after the uistroke update where you can scale it. Can someone help?
Frame behind frame or imagelabel.
Also for text, use textlabel
Yeah but i want to make it animated when you press it
What exactly do you mean animated?
Like growing or shrinking?
You can still make it animated, you’d just have to tween the size of the background frame as well as the primary frame. You could have the background be the actual frame and have the inner frame be scaled, which would automatically adjust the size if the size of the main frame (the background) was tweened.
Heres an example of what I mean, as you can see, it doesnt clutter on smaller sizes.
Just make sure the anchor point of the inner frame is set to (0.5 , 0.5), that way it sticks to the center. You can set the size of it to something like (0.9, 0, 0.9 , 0), that way it will always take up 90% of the square. For the position, start at something like (0.5 , 0 , 0.5 , 0), if you want to give the border a little inset effect, you can do (0.5 , 0 , 0.45, 0) instead.
just tween frame which is background (main) frame
frame child should automically size to main frame (roblox engine UI)
Animated like pressing the button (the main color goes a bit down) + shrink
it might textbutton with having background frame with local-script for this effect

