Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to tween ImageButtons' ImageTransparency property using TweenService:Create?

This one is very simple. Just want to know if there is a way to tween ImageButton ImageTransparencies.

Snippet of code:

for _,descendant in pairs(instance:GetDescendants()) do
			if descendant:IsA("ImageButton") then
				TweenService:Create(descendant,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{ImageTransparency=1}):Play()
			elseif descendant:IsA("TextLabel") then
				TweenService:Create(descendant,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{TextTransparency=1}):Play()
			end
		end

1 answer

Images use {ImageTransparency = 1} as opposed to {TextTransparency=1}.

local Tween = TweenService:Create(descendant,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{ImageTransparency=1})

Tween:Play()

2 comments

0

If there is an error, please let me know what it is.

0

Well, the code you wrote is pretty much the same as mine, and it also does not work.

This discussion is preserved as it was. New answers, comments, and votes are closed.