Try to squeeze the TweenInfo part into a line. It doesn’t work when it’s split into multiple lines (I don’t know why, but every time I squeeze it into a line, it works.)
Yes like @LukaDev_0 said your tween length is 2.5 seconds but you cancel in at 0.5 seconds so only 0.5 seconds of the tween will play and the other 2 seconds of the tween wont play.
Why not just first try without the wait and the tween:Cancel()? If this works, then you can set as argumeter for the wait function a >2.5 number or connect a completed event to the tween
Other people have already mentioned it, but I’m pretty sure it’s something to do with the tween:Cancel(). Try removing it and seeing what happens.
Also, why do you need it to be cancelled? Are you trying to move it to a certain position, or worried about timing?
→ If you’re trying to get it to a position mid-way through the tween, just change the time in your TweenInfo to 0.5 and place a part and move it to the position you want
→ If you’re just worried about the timing, then just change the time in your TweenInfo to 0.5
If it’s something else, please say!
local TweenService = game:GetService(“TweenService”)
local part = script.Parent
local tweenInfo = TweenInfo.new(
2.5, – Time
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
true,
0
)
local tween = TweenService:Create(part, tweenInfo, {Position = Vector3.new(23.481, 2.89, 31.457)})