Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What is the most efficient way to make UI circles?

I know of 2 ways to do this. I just wonder what is the most efficient way?

Code 1:

local parent = script.Parent
local color = Color3.fromRGB(0,0,0)-- makes the frame a Color3 RGB value
for i=1,360,1 do
	local frame = Instance.new("Frame",parent)--Makes a frame
	frame.Rotation=i -- Sets the rotation
	frame.Size = UDim2.new(0.5,0,0.5,0)--Sets size
	frame.BorderSizePixel=0 --Remove the border
end

Setup 2: Use a decal

7 comments

1

The most efficient way would be to use an ImageLabel!

1

Decals: low quality

1

Use several ImageLabels to make up one circle image. That way, you can get a high-res circle image out of 4 to 8 ImageLabels as apposed to 360 Frames.

0

Using images does not yield low-quality results. Do you have any evidence that they do? You can upload images larger than 1000x1000, which should be large enough for almost any purpose.

0

I tried, it has a border. I didn't want a border.

0

If you use paint.net or a tool like it you could make it transparent around the circle, just need BackgroundTransparency = 1

0

Lots of games use image UI elements for example treelands and their ui is High quality

1 answer

If you are looking for a GTA 5 interface, then make (for example) a 1/5 circle piece, and when you open the menu do the math to distribute them into 1/5 pieces.

This discussion is preserved as it was. New answers, comments, and votes are closed.