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

Help with tween?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago

I am moving a frame and its not moving smoothly. It stops then moves then stops..

TopPosition = UDim2.new(0.49, 0, 0.45, 0)
BottomPosition = UDim2.new(0.49, 0, 0.55, 0)

for i=.1,6 do
 script.Parent:TweenPosition(BottomPosition,"InOut","Quad",.75)
 wait(.75)
 script.Parent:TweenPosition(TopPosition,"InOut","Quad",.75)
 wait(.75)

end

script.Parent:Remove()

1 answer

Log in to vote
1
Answered by 8 years ago
TopPosition = UDim2.new(0.49, 0, 0.45, 0)
BottomPosition = UDim2.new(0.49, 0, 0.55, 0)

for i=.1,6 do
 script.Parent:TweenPosition(BottomPosition,"InOut","Quad",.75, true)
 wait(.75)
 script.Parent:TweenPosition(TopPosition,"InOut","Quad",.75,true)
 wait(.75)

end

script.Parent:Remove()

This iss because there is a 5th constraint thats optional which says if it can be tweened again while being tweened called override http://wiki.roblox.com/index.php?title=API:Class/GuiObject/TweenPosition

Ad

Answer this question