I am currently trying to code a fishing minigame that has a circle that spins around where the player must time their clicks so the arrow is above the green sections of the circle. I am using UIGradient to create the timing bars on the ring however whenever I try rotating the circle, sometimes the bars themselves would flicker.
Heres an example of it being fine:
Heres an example of it being buggy:
For the bar, I am using a frame that contains two image labels that both have a picture of a quarter circle, each containing their own UI Gradient that I change to match the timing size of the bar, then I rotate the background frame using the rotation value for it.
Solution wise, I made sure there was no ZIndex collisions, tried different rotation values on UIGradient, but I can’t find a consistent solution as sometimes the bars would flicker on timing values that were completely fine before.
I’ve seen other people on the forum have problems like mine but it seems for them it’s just an engine issue. I don’t know if I should try to make my current solution work or just try to find a separate solution.
Here is the code that creates the bars on the fishing ring.
-- alpha = size of bar / (max loop time of minigame/4)) since the bar sections are quarter circles
local function resizeBar(bar, alpha)
local halfSection1alpha = 1 - alpha
local offset = 0.001
local halfSection1 = bar.HalfSection1
halfSection1.UIGradient.Rotation = -90 * (1 - halfSection1alpha)
halfSection1.UIGradient.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1),
NumberSequenceKeypoint.new(halfSection1alpha, 1),
NumberSequenceKeypoint.new(halfSection1alpha + offset, 0),
NumberSequenceKeypoint.new(1, 0)
})
local halfSection2 = bar.HalfSection2
halfSection2.UIGradient.Rotation = -90 * (1 - alpha)
halfSection2.UIGradient.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0),
NumberSequenceKeypoint.new(alpha - offset, 0),
NumberSequenceKeypoint.new(alpha, 1),
NumberSequenceKeypoint.new(1, 1)
})
end
Any help would be greatly appreciated

