Hello.I made a lerping script for my game.But when I move It lerps it laggy.Any help would be good.
1 | function renderLoop() --looped with a renderstepped() function. |
2 | local tablet = cam.Tablet |
3 |
4 | swayOffset = swayOffset:Lerp(cam.CFrame * CFrame.new( 0 ,- 1.2 ,- 0.3 ),. 2 ) --The CFrame is where the tablet is going to be in the camera. |
5 | tablet:SetPrimaryPartCFrame(swayOffset) |
6 |
7 | end |
Im also going to give the link of the place so you can test yourself.
I fixed it.It's about the loop that I made.