UiCorner not working properly?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I am attempting to clone a circle Frame.

  2. What is the issue? Include screenshots / videos if possible!
    The UI corner stops working when cloned. There are no errors, and everything else works fine.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have double-checked that the UI corner still exists in the frame, and it does.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
    Code that generates the circle:

local CrossSection = CircleTemplate:Clone()
CrossSection.BackgroundColor3 = Color
CrossSection.BackgroundTransparency = 0
CrossSection.Name = "Sphere"
CrossSection.Parent = Canvas
-- Just a small section of the code, only the position and background transperency is modified. --

From my tests, I couldn’t replicate this issue. By not working, do you mean that the UI looks like a square?

Have you tried to see if the problem doesn’t occur in Roblox? This could be just a glitch/bug in Roblox Studio.

What is the CircleTemplate? Is it a frame?

I think what happened is that you changed the size of the frame (either larger/smaller) and by doing this, it changes on how huge the radius of the UICorner looks like. So you would need to edit the UICorner radius for the cloned frame (you can do this by changing the UICorner property while play testing to see if the UICorner of the cloned frame is already good enough)

Another thing you could do to probably solve the problem (if the answer above didn’t work) is that you could make a new UICorner instead by doing this:

local UICorner1 = Instance.new("UICorner")
UICorner1.CornerRadius = UDim.new({Scale},{Offset})
-- I forgot if it is UDim or Vector 
UICorner1.Parent = CrossSection
1 Like

I tried this solution, but it still doesn’t work. I know it clones properly.

Yes. I also wasn’t able to reproduce it in a separate in a barebones file.

Try to change the radius property of the UICorner of the cloned frame to something very high to see if the UICorner is actually working.