Combat System Error

Im making a combat system from Ampro’s new How to make a combat system and i keep getting this error.
Heres the script:

function FistCombat.PunchEffect(Args)
	local Punch = VFX.Punch:Clone()
	local Weld = Auxillary.Weld(Args.Character.HumanoidRootPart, Punch, CFrame.new(), CFrame.new())
	local WeldC0 = CFrame.new()
	
	if Args.Combo == 1 then
		WeldC0 = CFrame.new(1,6,-1) * CFrame.Angles(0,0,math.rad(100)) * CFrame.Angles(0,math.rad(100),0)
	elseif Args.Combo == 2 then
		WeldC0 = CFrame.new(-1,6,-1) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(0,math.rad(100),0)
	elseif Args.Combo == 3 then
		WeldC0 = CFrame.new(1,6,-3) * CFrame.Angles(0,0,math.rad(200)) * CFrame.Angles(0,math.rad(100),0)
	elseif Args.Combo == 4 then
		WeldC0 = CFrame.new(-1,6,-1) * CFrame.Angles(0,0,math.rad(-15)) * CFrame.Angles(0,math.rad(100),0)
	else
		for i,Particle in pairs(Punch.Trail:GetChildren()) do
			local ClonedParticle = Particle:Clone()
			ClonedParticle.Parent = Punch.Trail
			ClonedParticle.EmissionDirection = Enum.NormalId.Right
		end
	end
	
	Auxillary.Emit(Punch.Trail)
	Weld.C0 = WeldC0
	Punch.Parent = workspace.FX
	
	task.spawn(function()
		for i = 1, 6 do
			Punch.Mesh.TextureId = PunchTextures[i]
			wait()
		end
		Punch:Destroy()
	end)
	
	TS:Create(Weld, TweenInfo.new(.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out, 0,false,0), {C0--Problem + Weld.C0 * CFrame.Angles(0,math.rad(-100),0)}):Play()
end

Any ideas on how i can fix this?

What exactly is the error message you’re getting?

Its saying it doesnt exist because theres no variable but in the tutorial theres no error. This is the line that has the error:

TS:Create(Weld, TweenInfo.new(.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out, 0,false,0), {C0 + Weld.C0 * CFrame.Angles(0,math.rad(-100),0)}):Play()

I can paste in the whole script for more information.

you dont have a C0 = and rather do CO + Weld, this is why it errors

Yeah I mean it seems like C0 just doesn’t exist as a variable whatsoever? Did you mean to do WeldC0. Maybe C0 is declared somewhere in the video and you missed it? Can’t really tell without more context.

Im gonna rewatch the video to see if he made a mistake, thanks for the help guys.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.