When using UIStroke on a Frame with size set to UDim2.new(0,0,0,0), the UIStroke is still rendered on mobile devices, even though the parent frame has no visible size.
Steps to reproduce
- Create a frame in ScreenGui
- Set the frame’s properties
Size = UDim2.new(0,0,0,0)
Visible = true
- Insert UIStroke as a child of the frame
- Set the UIStroke properties:
StrokeSizingMode = Enum.StrokeSizingMode.ScaledSize
Thickness = 0.017
ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual
BorderStrokePosition = Enum.BorderStrokePosition.Inner
- Play the game in mobile or enable Device Emulator (phone) in studio
Observed Behavior
- A white frame rendered with unknown size
- Checking the frame
AbsoluteSizestill returns (0, 0) - This does not occur on desktop
Current Fix
use StrokeSizingMode FixedSize
System Information
- CPU 12th Gen Intel(R) Core™ i5-12400F
- Memory 16GB
- GPU GeForce RTX 4060
Expected behavior
If a frame absolute size is (0, 0), its UIStroke should:
- not render at all, or
- fully respect the parent zero size and remain invisible
A private message is associated with this bug report