Clock UI issues

Ok so I’m basically making a clock (with the full 60 seconds things), the whole scripting part is easy but I’m having some problems with the UI itself.

1st: The method I’m using to make the UI circular is using a UICorner and a UIStroke, problem? In game (and on different screen sizes) the size changes and makes the circle an oval.
image
image

2nd: The UI itself (making the things around the clock) is annoying and hard and would like to know if there’s an easy way to just create the whole 60 seconds instead of having to make them one by one and calculating manually it’s rotation.

2 Likes

To keep an accurate stroke size, I recommend dividing the Y Absolute Size to a number so that the thickness is resulted:

Stroke.Thickness = Clock.AbsoluteSize.Y / Factor

And for the oval part, just insert a UIRatioConstraint

3 Likes

Ok that solved most of my problems, ty

1 Like

To fix the oval shape use a UiAspectRatioConstraint. To make the 60 seconds quicker… well there are 2 things, use images or use a simple script.

2 Likes

Yeah I ended up using a script for it (it’s also easier to change if I want to)

local Hours = script.Parent.NonEfficientClock.Hours
local Minutes = script.Parent.NonEfficientClock.Minutes

local Rotation1 = 30
local Rotation2 = 6

local RotationCycle = 1

for i=1,12,1 do
	local HoursClone = Hours:Clone()
	
	HoursClone.Rotation = Rotation1
	HoursClone.Parent = Hours.Parent
	
	Rotation1 += 30
end

for i=1,47,1 do
	local MinutesClone = Minutes:Clone()
	
	if RotationCycle == 4 then
		RotationCycle = 1
		
		Rotation2 += 6
	else
		RotationCycle += 1
	end

	Rotation2 += 6

	MinutesClone.Rotation = Rotation2
	MinutesClone.Parent = Minutes.Parent
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.