Hi guys, i’m working on a flying script and i want it start smooth and if the player stops also end smoothly, the issue is im creating a new tween every heartbeat, it isnt right on timing (written 1 second, takes like 30 seconds) and i heard it can cause memory leaks/ is very laggy.
game:GetService("RunService").Heartbeat:Connect(function(Delta)
if script.Parent == Character then
TweenService:Create(BodyVelocity, TweenInfo.new(1), {Velocity = DirectionThing() * 25}):Play()
end
end)
Lerping wouldn’t deliver the same result since its basically ease out
If you want smooth starts and stops, use acceleration and friction
Linear interpolation is ease out? If you meant that you want an ease out effect you can just implement one, there are tons of those on the internet, but still you should just accelerate velocity instead
It doesn’t, it’s called “linear” and you’re just using it wrong it’s supposed to have the same change every time unless you’re giving it the wrong alpha