I wanna Make this from a script, not animation
2 Likes
so first you need an start point and an end point, as is a straight line, it will be easy, then u just animate the model, and thats it..
i already have points, i need to script it, not animate
2 Likes
Perfect, so try with tweens.
local TweenService = game:GetService("TweenService")
local part = workspace.MyPart -- replace this
local startPosition = part.Position
local endPosition = Vector3.new(0, 20, 0) -- put endpoint here
-- Tween settings
local tweenInfo = TweenInfo.new(
3, -- time (seconds)
Enum.EasingStyle.Linear, -- straight, constant speed
Enum.EasingDirection.Out, -- easing direction
0, -- repeat count (0 = once)
false, -- reverse
0 -- delay time
)
local goal = {Position = endPosition}
-- Create and play the tween
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
2 Likes
you could use tweens but animating them and just using the same animation for all of them would be more efficient
Looks like a custom interpolation with math.sin or math.cos
Since it flips axis direction just like this function does.
It seems that this is just a sine animation and since it seems that all models have the same rotation you could do something like math.sin(os.clock())
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.