Tweening BG Color of a Frame containing UI Gradient issue

  1. What do you want to achieve?

I want to create a button where the user can switch between dark mode and light mode.
More specifically, I want to tween BackgroundColor3 of a frame, containing a UIGradient tweening offset in the background.

  1. What is the issue?

Switching from Light mode to Dark mode causes delays to some frames, creating flickers.
Switching from Dark mode to Light mode, however, does not cause this issue.

Here’s the video:

  1. What solutions have you tried so far?

I have tried to disable all gradient animation/sound script to see if those interfere with the tween, sadly it doesn’t, still causing flickers.

I also tried to not use Tween Service for this situation.

-- Basically this
PlayerGui.ScreenGui.MainFrame.BGGradient2.BackgroundColor3 = Color3.fromRGB(0,0,0)
-- Which DOES work with no delays/flickers, but this is NOT the effect I want.

Not sure if this a Studio bug or not, hopefully this is the right category, please help, thank you so much.

this seems to be a studio bug, but if it isn’t, lmk.

(test by publishing under a different place and making it priv or something)

what if you tried to make like 2 sections on the ui gradient. One section for light mode and one sectrion for dark mode. I don’t know if you can do this or if this is possible but lmk if it works out

1 Like

@DevLazl Unfortunately, in Player’s client, it doesn’t work. I assume it is either a studio bug or just a graphic card problem.

@Sea_Pikl This works! I need to separate both the Light mode frame and Dark mode frame out, put them in Canvas, and play around with GroupTransparency!

Since the flickering is a studio bug (?), how can I report this?

Thank you so much for the help!

1 Like

You can report bugs/issues using the guide in this link

Glad to help!

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