I decided to try to make a tween for a GUI, but I’m not sure what I’m doing wrong
This is the code that I have right now
local info = TweenInfo.new(
3,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = TweenService:Create(clone.Main, info, {Visible = true})
tween:Play()
I’m not even sure what each EasingStyle animation looks like nor what does EasingDirection do, please help me out
1 Like
You cannot tween the property visible, it’s either true or false. There’s nothing between true or false.
You can change BackgroundTransparency
and TextTransparency
, set both to 1 and it is invisible, 0 is visible.
You can do that, but you cannot tween the Visible property
What is clone.Main, is it a GuiObject? If it’s a ScreenGui it won’t work. You can find more information about EasingStyle, and tweenInfo parameters on the API reference.
{Visible = true})
You can’t tween it’s visible property, so I assume your mean the transparency of your GuiObject. Replace this with BackgroundTransparency
. What Avionic said above.
How would I change the frames that are in the main frame, or do I need to do separate tweens for all of that
You can’t tween multiple instances at once, unless you iterate over them.
If you have a mainframe and sub frames under it, you can iterate over the children of the mainframe and tween them.
for i, v in pairs(MainFrame:GetChildren()) do -- iterate over childen of MainFrame
local tween = TweenService:Create(v, info, {BackgroundTransparency = 1}) -- This would apply to all the children
tween:Play()
end