Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

GUI Transparency not tweening?

Asked by 3 years ago
Edited 3 years ago

There were no errors in the output section, if someone could tell me what i did wrong that would be cool

for i,v in pairs(script.Parent:GetChildren()) do if not v:IsA("LocalScript") then local goal = {} if v:IsA("Frame") then goal.BackgroundTransparency = 1 else goal.TextTransparency = 1 local info = TweenInfo.new(1.5) local tween = TweenService:Create(v,info,goal)
end end end

1 answer

Log in to vote
0
Answered by 3 years ago

You first of all didnt specify the easing style and the easingdirection, the easingdirection is not that important, but the easing style is, you can see all of the easing styles by going to the roblox wiki, and you cant add stuff to the table by just typing the table name and then the property, you use table.insert(tablename, value), in this case if you used that then it wouldnt work properly, and then you can just add the values in to one single line, you dont need 3 seperate lines for one piece of code.

for i, v in pairs(script.Parent:GetChildren()) do
    if not v:IsA("LocalScript") then
        if v:IsA("Frame") then
            local tween = TweenService:Create(v, TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.In), { BackgroundTransparency = 1 })--:Play() -- remove the -- if you want to play the tween immediately.
        else
            local tween = TweenService:Create(v, TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.In), { TextTransparency = 1 })--:Play() -- remove the -- if you want to play the tween immediately.
        end
    end
end
0
Ah. thank you, I don`t usually use tweens so this helps. Thanks again. EpicJoeSwagson 4 — 3y
Ad

Answer this question