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

How to shorten a tweening? [closed]

Asked by 4 years ago
Play.MouseButton1Click:Connect(function()

    GuiSounds.Select:Play()
    game.ReplicatedFirst.Start.Disabled = true
    tweening:Play()

    Play:TweenPosition(UDim2.new(-1, 0, 0.264, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, false)
    Updates:TweenPosition(UDim2.new(-1, 0, 0.382, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 2, false)
    Credits:TweenPosition(UDim2.new(-1, 0, 0.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 3, false)
    Donate:TweenPosition(UDim2.new(-1, 0, 0.618, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 4, false)

    Back.Visible = true
    Back:TweenPosition(UDim2.new(0, 0, 0.833, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)

    Hair.Visible = true
    Beard.Visible = true
    Skin.Visible = true
    Gender.Visible = true
    Race.Visible = true

    Hair:TweenPosition(UDim2.new(0, 0, 0.29, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)
    Beard:TweenPosition(UDim2.new(0, 0, 0.396, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)
    Skin:TweenPosition(UDim2.new(0, 0, 0.501, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)
    Gender:TweenPosition(UDim2.new(0, 0, 0.604, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)
    Race:TweenPosition(UDim2.new(0, 0, 0.707, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 1.2, false)
end)
0
What's the most efficient way to do this? 44_PixeIs 28 — 4y
0
There really isn't a better way except referencing some of the variables or properties BlackOrange3343 2676 — 4y
0
Make an attempt or look it up hiimgoodpack 2009 — 4y
0
Would go ahead and make a function to handle that, just to keep from writing all that 90 times ForeverBrown 356 — 4y

Closed as Non-Descriptive by hiimgoodpack and BashGuy10

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Lucke0051 165
4 years ago

You could make two variables with the EasingDirector Enums. With the EasingStyle Enum you could do the same. With time too.

Though, the best way I think would be to put all you stuff u want to tween and their end position, loop through them and tween.

Ad