How to create shadow around the border of GUI popup window?

Hello
How do you create shadow around the border of UI popup window to separate it visually from other GUI windows which are below it?

Thanks

If I understand well you want to create a shadow for the GUI ?
If so just copy the main frame you’re using and put it in the background of your orginal frame with a drak color and ajust the position so it look like a shadow.

2 Likes

I usually use the CanvasGroup method. You can just add a CanvasGroup with the same parent as the GUI. The canvas has a lower ZIndex than the GUI to appear behind it. The canvas has the GUI’s size but with a higher size offset. Then, add a UIGradient below the canvas. The gradient should have a transparency from 1 to 0 then back to 1. Then, add another CanvasGroup inside that canvas group, filling it by setting the other one’s size to UDim2.fromScale(1,1). Then, copy the UIGradient into the other canvas, and set the other UIGradient’s rotation to 90 degrees.

There’s also another method called the 9-slice method. It’s pretty similar to my method but it uses ImageLabels instead. Here’s the documentation.

1 Like