Why use UICorner?
UICorner changes the rendered corners of many GuiObjects. It is a styling helper and does not change the object’s layout size or input behavior.
Try it in Roblox Studio
Create StarterGui > PracticeGui (ScreenGui) > Button (TextButton) and put this LocalScript inside Button. Run a client to inspect the shape.
Syntax
corner.CornerRadius = UDim.new(0, 10)Examples
UICorner
Give a button rounded corners.
local button = script.Parent
assert(button:IsA("TextButton"))
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 10)
corner.Parent = button- The UICorner must be a child of the UI object it styles.
- CornerRadius combines a scale and pixel offset; this example requests a 10-pixel radius.
- The button keeps the same Size and Activated behavior after its appearance changes.
Best practices
- Keep corner styling consistent across related controls.
- Do not rely on rounded corners alone to communicate that a control is interactive.
Runtime & versions
Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.
Luau documentation