Tweening Background Transparency not Working

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 trying to tween my background to fade out

  2. What is the issue? Include screenshots / videos if possible!
    though I have checked through multiple sources yt ,other posts, reddit, some random coding website, I seem to have very similar code and yet mine does not function as intended. The icon image label tweens in fine and rotates, but background transparency just wont budge.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have checked through multiple sources yt, other posts, reddit, some random coding website,

Sorry for the messy code, Im a new learner so this is advanced for me lol

Ignore the previous reply. You are able to tween transparency, as it is a plain number, which is Tweenable as described by this article: TweenService | Roblox Creator Documentation

I believe your issue may be due to tweening the StarterGui rather than the PlayerGui. Get the PlayerGui by first getting the local player game:GetService("Players").LocalPlayer, then the ScreenGui/Frame/ImageLabel, and tween that instead.

2 Likes

oops, thought you couldn’t!

my bad!

1 Like

Hmm I think I’ve changed it to what you meant but the background is still not fading when i test play, do you think its a studio bug or is there something wrong with my updated code, also thank you so much for your help :>

I did scan through it and I can’t see anything that may be effecting it?

Hm…is it possible that Tweens won’t work without a direction? I noticed that your tweenInfo2 doesn’t have an EasingDirection.

1 Like

Hi again
thank you for replying so soon,
I just added in an ,Enum.EasingDirection.Out
unfortunately nothing seems to have changed. :> Thank you for helping me out so much though, I’ll stop taking your time and see if I can find out why, I am also going to test run the game to see if it is a studio issue.

Ah, I might have found it. tween3:Play() doesn’t return a Tween object, so using :Wait() results in an error (at least when I’ve tested the code myself).

If that is the case, you can consider adding a line under the tween3:Play(), tween3.Completed:Wait(), which waits for the tween to complete before continuing (and playing tween4).

1 Like

Oh Thank you I’ll check that out now, To be honest i think ive messed up something really important as in play testing the gui did not load, at all. I’ll sort the tween3 bit now, thank you for being patient with me

Oh wow! yes that sorted it, its running perfectly in studio now thank you, I just need to save it so I can test as a different client. Thank you so much!

1 Like