Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = currentcframe:components();
- local torsocf = CFrame.new(x,ypos,z,R00,R01,R02,R10,R11,R12,R20,R21,R22);
- local cf = torsocf;
- local cfp = cf.p;
- if turntorsoto and turntorsoto~=last_turn then
- -- Changed turn
- v.turnlv = cf*CFrame.new(0,0,-3).p;
- v.turnlerp = 0;
- end
- if status == "walking" then
- cf = CFrame.new(currentcframe.p+currentcframe.lookVector*((.1)*Speed*updateTime))
- end
- if turntorsoto ~= nil and turnlerp and turnlv then
- local clamped = Vector3.new(turntorsoto.X,currentcframe.p.Y,turntorsoto.Z)
- cf = CFrame.new(
- cf.p,
- v.turnlv:lerp(clamped,clamp(v.turnlerp,0,1))
- );
- end
- cfp = cf.p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement