I’ve seen someone tween a value onstream so I wanna learn how to tween a value?
Good question. You can actually tween it how you would in any other case.
local TS = game:GetService('TweenService')
local myValue = Instance.new('IntValue', workspace)
myValue.Value = 1
TS:Create(myValue, TweenInfo.new(5), {Value = 1234}):Play() -- Should tween from 1 to 1234 in 5 seconds.
10 Likes
Thanks! Quick question what is TweenInfo.new(5) ?? Does it play it 5 times?? I’ve read this off of the wiki but I skimmed
2 Likes
No, that’s the amount of time the tween takes. You can define how many times it plays with one of the arguments, I can’t remember which one specifically though. You can check out the orders of arguments here: TweenInfo | Documentation - Roblox Creator Hub
Oh I knew that it was the amount of time it took but I mostly tweened parts so I thought you need EasingStyle etc.
2 Likes
Nah, if you leave any of the arguments blank, they will go to the default value.
1 Like