UI Corner add script



local ReplicatedStorage = game.ReplicatedStorage
local frame = script.Parent:WaitForChild("Frame").ScrollingFrame
local number = ReplicatedStorage.DevProducts:GetChildren()



for i = 1, #number do
	print(i)
	local button = Instance.new("ImageButton")
	button.Parent = frame
	button.Name = i
	local UICorner = Instance.new("UICorner")
	UICorner.Parent = button
	UICorner.CornerRadius.Offset = 32
end



UICorner.CornerRadius.Offset = 32
Whats wrong here. And how do I fix it?

1 Like

if you want a ui corner you can simply just insert a UI corner inside the ui you want

or i just did not understand what you are saying

I want to make the UI corner more round by changing the off set

thats not a property of uicorners

Is there a reason why you aren’t adding the UICorner from the explorer? Can you also check your output for errors?

This is incorrect.

image

UICorner needs a “UDim” value – Also do not use a UDim2 they are 2 different datatype’s
You would need to do

UICorner.CornerRadius = UDim.new(0, 32)
5 Likes