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

How do I change the speed of a GUI when it has been tweened?

Asked by 4 years ago

I'm making a GUI that goes from the bottom of the screen right until the top, however, whenever entering a number value into the tween event the speed at which the GUI is moving is still exactly the same and the movement still happens in 1 second, but I'm not entirely sure how I would change this.

Below is the code that I have used and I'm not entirely sure why this doesn't work, when reading on the Roblox forums this is what I found.

Code:


textLabel:TweenPosition(UDim2.new(position, 0, -0.5, 0, nil, nil, 6))

The six is the time I want the GUI to finish its animation.

1 answer

Log in to vote
1
Answered by
p0vd 207 Moderation Voter
4 years ago
Edited 4 years ago

Remember to check your code you forgot to end the parathenses.

textLabel:TweenPosition(UDim2.new(position, 0, -0.5, 0),nil,nil,6)
0
Please accept if this helped you. p0vd 207 — 4y
0
'Note that nil can be used for either of the easing options if you don't need to change the default EasingDirection of Out or the default EasingStyle of Quad.' Taken straight from the Roblox API. RyanTheLion911 195 — 4y
0
Oh my bad, but did this fix it? p0vd 207 — 4y
0
Also, I didn't forget to end the parenthesis. RyanTheLion911 195 — 4y
View all comments (2 more)
0
okay but you ended the parenthesis wrongly, udim2 takes 4 numbers 2 scales 2 offsets. p0vd 207 — 4y
0
Thanks. RyanTheLion911 195 — 4y
Ad

Answer this question