Here’s the bit that I edited:
function Blow(Hit)
if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
return
end
local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
if not RightArm then
return
end
local RightGrip = RightArm:FindFirstChild("RightGrip")
if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
return
end
local character = Hit.Parent
if character == Character then
return
end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid or humanoid.Health == 0 then
return
end
local player = Players:GetPlayerFromCharacter(character)
if player and (player == Player or IsTeamMate(Player, player)) then
return
end
UntagHumanoid(humanoid)
TagHumanoid(humanoid, Player)
if character:FindFirstChild("GoldArmor") then
humanoid:TakeDamage(math.floor(Damage-(24%Damage)+0.5))
elseif character:FindFirstChild("IronArmor") then
humanoid:TakeDamage(math.floor(Damage-(30%Damage)+0.5))
elseif character:FindFirstChild("DiamondArmor") then
humanoid:TakeDamage(math.floor(Damage-(56%Damage)+0.5))
else
humanoid:TakeDamage(math.floor(Damage-(14%Damage)+0.5))
end
if Damage > 0 then
local velo = Instance.new("BodyVelocity",character.PrimaryPart)
velo.MaxForce = Vector3.new(1000000,1000000,100000)
velo.P = 100000
local ConvictHRP = Player.Character.PrimaryPart
local VictimHRP = character.PrimaryPart
local Angle = ((VictimHRP.Position - ConvictHRP.Position) * Vector3.new(10,0,10)).Unit * 50 + Vector3.new(0,25,0)
velo.Velocity = Angle
wait(0.1)
velo:Destroy()
end
end
The knockback system is still being experimented with. Normal ClassicSword still works. I can’t seem to figure out where I went wrong as I’ve done this before and it worked fine. The knockback system works but only on a lunge.