Incredibly long yield time while setting CFrame with the spr library

So I’m having issues with Spring.completed() taking suuper long to fire. I’ve tried different parameters and it’s only firing consistently with insanely high frequency numbers which makes it look terrible.

Something weird I noticed, while watching the Camera’s CFrame, is the X axis of its orientation just keeps jumping around from 0.036 - 0.038 until it finally settles at 0, ages later, and fires like it should. (This is using Fraktality’s spring module)



Here’s my module script:

local CutsceneController = {}

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Spring = require(ReplicatedStorage:WaitForChild('spr'))
local Signal = require(ReplicatedStorage:WaitForChild('Signal'))
CutsceneController.CutsceneCompleted = Signal.new()

local Camera = game.Workspace.CurrentCamera

function CutsceneController:SetCameraTarget(Location : CFrame, Dampening : number, Frequency : number) : nil
  Camera.CameraType = Enum.CameraType.Scriptable
    
  Spring.completed(Camera,
    function()
      print('Cam move complete!')
      CutsceneController.CutsceneCompleted:Fire()
    end
  )
    
  Spring.target(
    Camera,
    Dampening,
    Frequency,
      {
        CFrame = Location
      }
    )
end




And the script running the animation:

CutsceneController:SetCameraTarget(
    game.Workspace.CamPos1.CFrame,
    0.85,
    1.75
)

Any help would be greatly appreciated! :slight_smile:

1 Like

I’m facing the same issue as you have you found any solution yet I believe this is happening because spr.target visually looks complete but its still moving very tiny amounts before it truly stops moving and those small movements aren’t visible to the eyes making the completed callback feel delayed