Roblox Animate Sending Errors

when i was making my own animate by adding my own animations, but whenever now i run it this error pops up

  01:07:22.393  Workspace.ChrisPlaysRoblox690.AnimateV2:479: attempt to perform arithmetic (sub) on nil  -  Client - AnimateV2:479
  01:07:22.394  Stack Begin  -  Studio
  01:07:22.394  Script 'Workspace.ChrisPlaysRoblox690.AnimateV2', Line 479 - function move  -  Studio - AnimateV2:479
  01:07:22.394  Script 'Workspace.ChrisPlaysRoblox690.AnimateV2', Line 592  -  Studio - AnimateV2:592
  01:07:22.394  Stack End  -  Studio

I’m going to need a little more information than that, could you send the chunks of code where the lines are erroring?

the first one

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1

	if lastTick == 0 then
		lastTick = time
		return
	end

	local deltaTime = time - lastTick
	lastTick = time

	local climbFudge = 0
	local setAngles = false

	if jumpAnimTime and jumpAnimTime > 0 then
		jumpAnimTime = jumpAnimTime - deltaTime
	end

	if pose == "FreeFall" and jumpAnimTime <= 0 then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif pose == "Seated" then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif pose == "Running" then
		playAnimation("walk", 0.1, Humanoid)
	elseif pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "PlatformStanding" then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
end

I had to remake it.

and the other code

while Figure.Parent ~= nil do
	local _, time = task.wait(0.1)
	move(time)
end

Change the spelling of time because the rest of your code thinks time is the global function