Hello all! i have this script i’m making where i want to avoid having a ton of tweens all over the place, so i’m going to try to use a function to handle all of my tweens, but i want to know if it’ll work before i try anything, since i’m not actually using the function right now.
Here is my function
local function doTween(part,sec,prop,val)
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
sec,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = tweenService:Create(part, tweenInfo, {prop = val})
tween:Play()
end
so does anyone know if that will work? “prop” is what’s used to refer to the property it’ll be tweening, but i dont know if this is a viable way to do properties
many thanks!