local TweenService = game:GetService("TweenService") local label = script.Parent local Info = TweenService.new( 5, --Length Enum.EasingStyle.Sine, --Easing Style Enum.EasingDirection.Out, --Easing Direction 0, --Times repeated false, --Reverse 1 --Delay (seconds) ) local Goals = { Position = UDim2.new ({0.54, 0},{0.359, 0}); } local ChangePositionTween =TweenService:Create(label,Info,Goals) wait(3) ChangePositionTween:Play()
Layout: https://i.gyazo.com/011f7d0f8baebd83a09ee9c93a2b0a54.png
I am trying to make the text label change position using the tween service
Your code is fine. You just mixed up a word.
Instead of using TweenInfo.new
, you used TweenService.new
.
By the way, you don't need to go through all that to tween positions. You could instead just use TweenPosition.
gui:TweenPosition(UDim2,EasingDirection,EasingStyle,Time,Override,Callback)
And there's no need to put the {},{} in your UDim2s. It's unnecessary.