What do you want to achieve? Keep it simple and clear!
I want the code to tween the gui from background transparency 1 to 0 and then 0 to 1
What is the issue? Include screenshots / videos if possible!
The issue is that nothing happens when I run the code as the gui does not change transparency
I have not found any solutions for this so far and the script is a local script and the frame is startergui
local TweenService = game:GetService("TweenService")
local Transparency_tween = TweenService:Create(
script.Parent,
TweenInfo.new(5,Enum.EasingStyle.Linear),
{Transparency = script.Parent.BackgroundTransparency}
)
Transparency_tween:Play()
Transparency_tween.Completed:Connect(function()
print("Tween Not working")
end)
This is because the tween won’t change the transparency due to it already being what you are trying to tween it to. I recommend using 2 tweens instead.
local TweenService = game:GetService("TweenService")
local Transparency_tween = TweenService:Create(
script.Parent,
TweenInfo.new(5,Enum.EasingStyle.Linear),
{Transparency = 1}
)
Transparency_tween:Play()
local Transparency_tween2 = TweenService:Create(
script.Parent,
TweenInfo.new(5,Enum.EasingStyle.Linear),
{Transparency = 0}
)
Transparency_tween.Completed:Connect(function()
Transparency_tween2:Play()
end)
I’m not all that good at it myself, but tweenservice only changes it when its not equal to what it already is. Tbh, for this scenario thats only thing that really comes to mind for tips.