Can you play CFrame animations that are in a table

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I have a table of CFrame values but I don’t know how to play them.

  1. What is the issue? Include screenshots / videos if possible!

Players.VoidPan_Dev.PlayerGui.LocalScript:78: invalid argument #2 (Vector3 expected, got table). I want it to play the table instead it expects a Vector3.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried posting but nothing helpful came up.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Run.RenderStepped:connect(function()
	if WeaponInHand and LArm and RArm then
		gui.TextLabel.Text = "Ammo: "..ammo.."/30"
		if ammo <= maxAmmo/6 then
			gui.Low.Visible = true
		else
			gui.Low.Visible = false
		end
		mouse.TargetFilter = cam
		WeaponInHand:SetPrimaryPartCFrame(
			cam.CFrame
				* maincf
				* gunbobcf
				*reloadcf -- here is the error
				*sprintcf
				*recoilcf
				--*boltcf
				*aimcf
		)

		LArm:SetPrimaryPartCFrame(
			WeaponInHand.PrimaryPart.CFrame
				*Larcf

		)

		RArm:SetPrimaryPartCFrame(
			WeaponInHand.PrimaryPart.CFrame
				*rarmcf

		)

		if running then
			gunbobcf = gunbobcf:Lerp(CFrame.new(
				0.1 * math.sin(tick()* 2), --how intenses the x axis is
				0.1 * math.sin(tick() * 4	), -- how intense the y axis is
				0
				), 0.1)

			if sprinting then
				sprintcf = sprintcf:Lerp(WeaponData.SprintCFrame, 0.1)
			else
				sprintcf = sprintcf:Lerp(CFrame.new(), 0.1)
			end
		else
			gunbobcf = gunbobcf:Lerp(CFrame.new(), 0.1)
			sprintcf = sprintcf:Lerp(CFrame.new(), 0.)

		end

		if aiming then
			local tween = Tween:Create(cam, aimTween, {FieldOfView = 70/1.5}) -- current fov / zoom
			tween:Play()
			aimcf = aimcf:Lerp(WeaponData.AimCFrame, 0.1) -- the lower the number the slower the speed is
		else
			local tween = Tween:Create(cam, aimTween, {FieldOfView = 70}) -- current fov / zoom
			tween:Play()
			aimcf = aimcf:Lerp(CFrame.new(), 0.1)
		end
		recoilcf = recoilcf:Lerp(CFrame.new(),0.1)
	end
end)

function reload()
	user.InputBegan:Connect(function(key)

		if key.KeyCode == Enum.KeyCode.R then
			reloading = true
			reloadcf = WeaponData.GunAnimations.ReloadCFrame
			if reloading then
				sprinting = false
				events.Sprint:FireServer(14)
				local Mag = WeaponInHand:WaitForChild("Mag")
				
				reloadcf = reloadcf:Lerp(Vector3.new(), 0.1)
				Mag:WaitForChild("Reloadsn"):Play()
				wait(2)
				ammo = 30
				reloading = false
				wait(0.0001)
				shooting = false
			end
		end
	end)
end

Due to how math work in programming you can’t use tables and cframe to calculate a cframe result, you can create function that returns reloadcf as the final cframe that then can be used in the table along with other values.

Have you tested the functionality of this line
Considering from the little snippet you have reloadcf was not initialized as a CFrame or your method of lerping is not returning a Cframe

I have it on line 42

local reloadcf = CFrame.new()