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?