Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make CFrame:Lerp() disregard the Y value?

Asked by 9 years ago

I made this script since I am new to CFrame to test it, and how would I make it disregard the Y value?

A=workspace.A
B=workspace.B

local p=Instance.new('Part',workspace);p.Anchored=true
p.CFrame=A.CFrame

while wait() do
for i=0,1,.01 do
    p.CFrame=p.CFrame:lerp(B.CFrame,i)
    wait()
end
for i=0,1,.01 do
    p.CFrame=p.CFrame:lerp(A.CFrame,i)
    wait()
end
end

Answer this question