I made some lerp code to move some joints from one position to another. However, I was wondering if I could use a sine style instead of linear.
Here's my lerp function:
function LerpC0(Joint, EndPos, Speed, Force)
local Code = MR(-1234567890, 1234567890)
local LCode = Joint:FindFirstChild("LerpCodeC0") or IN("NumberValue", Joint)
LCode.Name = "LerpCodeC0"
LCode.Value = Code
local BaseC0 = Joint.C0
delay(0, function()
for i = 0, 1, 1/60/Speed do
if LCode.Value ~= Code then break end
Joint.C0 = BaseC0:lerp(EndPos, i)
HB:wait()
end
if LCode.Value == Code or Force then Joint.C0 = EndPos end
end)
end
I know I would use math.sin(), but how would I use it?

3 comments
What easing style do you want? In, Out, or InOut?
You could try checking out this place, https://www.roblox.com/games/557635264/Part-Easing-Showcase In it, I incorporate multiple easing functions.
Out