Why is the recorded animation backwards?

So, I have this problem with my recording script script that makes the animation backwards.

Record_2021_11_29_00_17_19_295

I just want to know how to flip the animation

This is the script.

	while game.ReplicatedStorage.Recording.Value == true do
		local cframevalue = script.fold.Values["0"]:Clone()
		cframevalue.Parent = cframefolder
		cframevalue.Name = num
		cframevalue.Value = part.CFrame
		
		--neck
		
		local nec = script.fold.Values["0"]:Clone()
		nec.Parent = rig["Torso.Head"]["0"].Values
		nec.Name = num
		nec.Value = workspace.R6.Torso.Neck.C1 * plr.Character.Torso.Neck.Transform
		
		-- torso
		
	--	workspace.R6.Torso.Neck.C0 =  workspace.imdednowgoaway.Torso.Neck.C0 * workspace.imdednowgoaway.Torso.Neck.Transform
		
		local tor = script.fold.Values["0"]:Clone()
		tor.Parent = rig.Torso["0"].Values
		tor.Name = num
		tor.Value = plr.Character.HumanoidRootPart.RootJoint.C1 * plr.Character.HumanoidRootPart.RootJoint.Transform 
		
		--arms
		local ls = script.fold.Values["0"]:Clone()
		ls.Parent = rig["Torso.Left Arm"]["0"].Values
		ls.Name = num
		ls.Value = plr.Character.Torso["Left Shoulder"].C1 * plr.Character.Torso["Left Shoulder"].Transform
		
		local rs = script.fold.Values["0"]:Clone()
		rs.Parent =  rig["Torso.Right Arm"]["0"].Values
		rs.Name = num
		rs.Value =  plr.Character.Torso["Right Shoulder"].C1 * plr.Character.Torso["Right Shoulder"].Transform 
		--legs
		local ls = script.fold.Values["0"]:Clone()
		ls.Parent = rig["Torso.Left Leg"]["0"].Values
		ls.Name = num
		ls.Value = plr.Character.Torso["Left Hip"].C1 * plr.Character.Torso["Left Hip"].Transform 

		local rs = script.fold.Values["0"]:Clone()
		rs.Parent = rig["Torso.Right Leg"]["0"].Values
		rs.Name = num
		rs.Value = plr.Character.Torso["Right Hip"].C1 * plr.Character.Torso["Right Hip"].Transform
		
		
		num += 60 / fps
		wait(1 / fps)
	end

Here’s some more gifs of my broken animation script

Record_2021_11_29_00_40_38_106

1 Like

Found the solution. All I did was inverse the Transform Property.

nec.Value = workspace.R6.Torso.Neck.C1 * plr.Character.Torso.Neck.Transform:Inverse()

1 Like