whats the most optimized and efficient way to tween a models size?
I know about the model:ScaleTo() and model:GetScale() methods
whats the most optimized and efficient way to tween a models size?
I know about the model:ScaleTo() and model:GetScale() methods
You can use linear interpolation which will be the easiest one (built-in function in math library).
If you are going for other effect you can try using Bezier or sine curves.
To my knowledge, there is no ‘optimized’ way to tween a model, the best method available is the following one, which get the job done but still is activity heavy.
local TweenService = game:GetService("TweenService")
local Model = ...
local ScaleValue = Instance.new("NumberValue")
local ScaleInfos = TweenInfo.new(0.5, Enum.EasingStyle.Linear)
local ScaleTween = TweenService:Create(ScaleValue, ScaleInfos, {Value = 1})
local ScaleChanged = ScaleValue:GetPropertyChangedSignal("Value"):Connect(function()
Model:ScaleTo(ScaleValue.Value)
end)
ScaleValue.Value = 0
ScaleTween:Play()
ScaleTween.Completed:Wait()
ScaleChange:Disconnect()
ScaleChange = nil
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.