My BackgroundTransparency animation not working

Then it creating on clone of an imagelabel there suppost to be an animation that i make.
The point it to go from 1 to 0 in 2 seconds.

But for some reason whatever i do the clone pop up instantly without the animation.

I try to make it spawn without animation direct set of number

imageLabel.BackgroundTransparency = 0.5

And that also didnt work.

Any reason why the animation dont start ?


    local randomFrame = itemFrames[math.random(1, #itemFrames)]
	local imageLabel = imageLabelTemplate:Clone()
	imageLabel.Parent = randomFrame

	imageLabel.Size = UDim2.new(0, 100, 0, 100)
	local frameWidth, frameHeight = randomFrame.AbsoluteSize.X, randomFrame.AbsoluteSize.Y
	local randomX = math.random(0, math.max(frameWidth - 100, 0))
	local randomY = math.random(0, math.max(frameHeight - 100, 0))

	imageLabel.Position = UDim2.new(0, randomX, 0, randomY)
	
	imageLabel.BackgroundTransparency = 1
	
	tweenService:Create(imageLabel, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()

Try adding a print statement right before the tween plays

If it shows up in the output, then make sure you’re editing the GUI inside of the player’s PlayerGui, rather than the one in StarterGui

If it doesn’t show up, then make sure that there aren’t any errors originating from this script in the output

If there is an error, please provide a screenshot or write a reply with all of the information that it provides

If there isn’t an error, carefully check the code to make sure that there isn’t anything blocking it, such as an infinite while loop

Ok i fix it after reading more abouth the imagelabels for this animation to work.
And the print reports i readed.

I also need to make for the image transparency not only the background.

1 Like

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