Could you maybe send the edited script?
Sure. Here you are:
newHitbox.OnHit:Connect(function(hit, humanoid)
if Config.CanHitNpc and not Config.CanHitPlayer then
print("1")
if NPCFolder:FindFirstChild(humanoid.Parent.Name) and humanoid.Parent ~= Players:GetPlayerFromCharacter(humanoid.Parent) then
print("2")
if Config.CanBreakArmor then
print("3")
if humanoid.ArmorAmount.Value > 0 then
print("4")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("5")
if Config.BodyDamage and not Config.DamageNormal then
print("6")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("7")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("8")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("9")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("10")
if Config.BodyDamage and not Config.DamageNormal then
print("11")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("12")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("13")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("14")
return
end
end
elseif humanoid.ArmorAmount.Value == 0 then
print("15")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("16")
if Config.BodyDamage and not Config.DamageNormal then
print("17")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print('22')
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print('23')
return
elseif Config.BodyDamage and Config.DamageNormal then
print('24')
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("25")
if Config.BodyDamage and not Config.DamageNormal then
print("26")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("27")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("28")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("29")
return
end
end
end
elseif not Config.CanBreakArmor then
print("30")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("31")
if Config.BodyDamage and not Config.DamageNormal then
print("32")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
--humanoid:TakeDamage(Config.LegDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
--humanoid:TakeDamage(Config.ArmDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
--humanoid:TakeDamage(Config.TorsoDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.Head then
print('Head')
-- humanoid:TakeDamage(Config.HeadDamage)
print(humanoid.Health)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("33")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("34")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("35")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print('36')
if Config.BodyDamage and not Config.DamageNormal then
print("37")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print('Arm')
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print('Torso')
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("38")
humanoid:TakeDamage(Config.HeadDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("39")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("40")
return
end
end
end
else return
end
elseif Config.CanHitPlayer and not Config.CanHitNpc then
print("41")
if humanoid.Parent == Players:GetPlayerFromCharacter(humanoid.Parent) then
print("42")
if Config.CanBreakArmor then
print("43")
if humanoid.ArmorAmount.Value > 0 then
print("44")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("45")
if Config.BodyDamage and not Config.DamageNormal then
print("46")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("47")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("48")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("49")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("50")
if Config.BodyDamage and not Config.DamageNormal then
print("51")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print('Arm')
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("52")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("53")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("54")
return
end
end
elseif humanoid.ArmorAmount.Value == 0 then
print("55")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("56")
if Config.BodyDamage and not Config.DamageNormal then
print('57')
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("58")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("59")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("60")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("61")
if Config.BodyDamage and not Config.DamageNormal then
print("62")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("67")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("68")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("69")
return
end
end
end
elseif not Config.CanBreakArmor then
print("70")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("71")
if Config.BodyDamage and not Config.DamageNormal then
print("72")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("73")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("74")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("75")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("76")
if Config.BodyDamage and not Config.DamageNormal then
print("77")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print('Leg')
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print('Torso')
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("78")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("79")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("80")
return
end
end
end
else
print('81')
return
end
elseif not Config.CanHitPlayer and not Config.CanHitNpc then
print("82")
return
elseif Config.CanHitPlayer and Config.CanHitNpc then
print("83")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("84")
if Config.BodyDamage and not Config.DamageNormal then
print("85")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("86")
if Config.BodyDamage and not Config.DamageNormal then
print("87")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
end
end
end
end)
I have too many statements though and that’s a mess lol.
If it’s the complete edit script then I try
No, it isn’t the complete edited script.
Here is the whole script:
-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterPack = game:GetService("StarterPack")
-- Variables
local player, character, humanoid, tool
tool = script.Parent.Parent
character = tool.Parent.Parent.Character
humanoidVar = character:WaitForChild("Humanoid")
player = Players:GetPlayerFromCharacter(character)
-- ASCS Folder
local ASCS = ReplicatedStorage.ASCS
-- Remote Events Folder
local RemoteEventsFolder = ASCS.RemoteEvents
-- Assets Folder
local AssetsFolder = ASCS.Assets
-- OtherFolders
local NPCFolder = workspace.NPCs
-- Values Folder
local GlobalValuesFolder = ASCS.Values
local ToolValuesFolder = tool.Values
-- Remote Events
local RemoteEvents = {
RemoteEventsFolder.AddCombo;
RemoteEventsFolder.ResetCombo;
RemoteEventsFolder.HitStop;
RemoteEventsFolder.HitStart;
}
-- Values
local Values = {
ToolValuesFolder:WaitForChild("CanDamage");
GlobalValuesFolder:WaitForChild("ArmorAmount");
ToolValuesFolder:WaitForChild("Combo");
GlobalValuesFolder:WaitForChild("ArmorEnabled");
}
-- Tool Config Folder
local WeaponConfig = ASCS.ToolConfig
-- Tool
local tool = script.Parent.Parent
-- Modules
local RaycastHitboxV4 = require(ASCS.Modules.RaycastHitboxV4)
local GlobalConfig = require(ASCS.GlobalConfig.Config)
local Config = require(WeaponConfig:FindFirstChild(tool.Name))
print("Character, humanoid, tool and player is set in the variable.")
local Model = ASCS.Models:FindFirstChild(tool.Name).Handle:Clone()
Model.Parent = tool
-- Hitbox
local newHitbox = RaycastHitboxV4.new(tool:WaitForChild("Handle"))
newHitbox.RaycastParams = RaycastParams.new()
newHitbox.RaycastParams.FilterDescendantsInstances = {character}
newHitbox.RaycastParams.FilterType = Enum.RaycastFilterType.Blacklist
newHitbox.OnHit:Connect(function(hit, humanoid)
if Config.CanHitNpc and not Config.CanHitPlayer then
print("1")
if NPCFolder:FindFirstChild(humanoid.Parent.Name) and humanoid.Parent ~= Players:GetPlayerFromCharacter(humanoid.Parent) then
print("2")
if Config.CanBreakArmor then
print("3")
if humanoid.ArmorAmount.Value > 0 then
print("4")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("5")
if Config.BodyDamage and not Config.DamageNormal then
print("6")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("7")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("8")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("9")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("10")
if Config.BodyDamage and not Config.DamageNormal then
print("11")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("12")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("13")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("14")
return
end
end
elseif humanoid.ArmorAmount.Value == 0 then
print("15")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("16")
if Config.BodyDamage and not Config.DamageNormal then
print("17")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print('22')
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print('23')
return
elseif Config.BodyDamage and Config.DamageNormal then
print('24')
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("25")
if Config.BodyDamage and not Config.DamageNormal then
print("26")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("27")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("28")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("29")
return
end
end
end
elseif not Config.CanBreakArmor then
print("30")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("31")
if Config.BodyDamage and not Config.DamageNormal then
print("32")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
--humanoid:TakeDamage(Config.LegDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
--humanoid:TakeDamage(Config.ArmDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
--humanoid:TakeDamage(Config.TorsoDamage)
print(humanoid.Health)
elseif hit == Enum.BodyPartR15.Head then
print('Head')
-- humanoid:TakeDamage(Config.HeadDamage)
print(humanoid.Health)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("33")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("34")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("35")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print('36')
if Config.BodyDamage and not Config.DamageNormal then
print("37")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print('Arm')
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print('Torso')
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("38")
humanoid:TakeDamage(Config.HeadDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("39")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("40")
return
end
end
end
else return
end
elseif Config.CanHitPlayer and not Config.CanHitNpc then
print("41")
if humanoid.Parent == Players:GetPlayerFromCharacter(humanoid.Parent) then
print("42")
if Config.CanBreakArmor then
print("43")
if humanoid.ArmorAmount.Value > 0 then
print("44")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("45")
if Config.BodyDamage and not Config.DamageNormal then
print("46")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("47")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("48")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("49")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("50")
if Config.BodyDamage and not Config.DamageNormal then
print("51")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid.ArmorAmount.Value -= Config.LegDamage
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print('Arm')
humanoid.ArmorAmount.Value -= Config.ArmDamage
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid.ArmorAmount.Value -= Config.TorsoDamage
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid.ArmorAmount.Value -= Config.HeadDamage
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("52")
humanoid.ArmorAmount.Value -= Config.NormalDamage
elseif not Config.BodyDamage and not Config.DamageNormal then
print("53")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("54")
return
end
end
elseif humanoid.ArmorAmount.Value == 0 then
print("55")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("56")
if Config.BodyDamage and not Config.DamageNormal then
print('57')
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("58")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("59")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("60")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("61")
if Config.BodyDamage and not Config.DamageNormal then
print("62")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("67")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("68")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("69")
return
end
end
end
elseif not Config.CanBreakArmor then
print("70")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("71")
if Config.BodyDamage and not Config.DamageNormal then
print("72")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("73")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("74")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("75")
return
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("76")
if Config.BodyDamage and not Config.DamageNormal then
print("77")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print('Leg')
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print('Torso')
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
elseif not Config.BodyDamage and Config.DamageNormal then
print("78")
humanoid:TakeDamage(Config.NormalDamage)
elseif not Config.BodyDamage and not Config.DamageNormal then
print("79")
return
elseif Config.BodyDamage and Config.DamageNormal then
print("80")
return
end
end
end
else
print('81')
return
end
elseif not Config.CanHitPlayer and not Config.CanHitNpc then
print("82")
return
elseif Config.CanHitPlayer and Config.CanHitNpc then
print("83")
if humanoid.RigType == Enum.HumanoidRigType.R15 then
print("84")
if Config.BodyDamage and not Config.DamageNormal then
print("85")
if hit == Enum.BodyPartR15.RightFoot or hit == Enum.BodyPartR15.LeftFoot or hit == Enum.BodyPartR15.RightLowerLeg or hit == Enum.BodyPartR15.LeftLowerLeg or hit == Enum.BodyPartR15.RightUpperLeg or hit == Enum.BodyPartR15.LeftUpperLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPartR15.RightHand or hit == Enum.BodyPartR15.LeftHand or hit == Enum.BodyPartR15.RightLowerArm or hit == Enum.BodyPartR15.LeftLowerArm or hit == Enum.BodyPartR15.RightUpperArm or hit == Enum.BodyPartR15.LeftUpperArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPartR15.UpperTorso or hit == Enum.BodyPartR15.LowerTorso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPartR15.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
end
elseif humanoid.RigType == Enum.HumanoidRigType.R6 then
print("86")
if Config.BodyDamage and not Config.DamageNormal then
print("87")
if hit == Enum.BodyPart.RightLeg or hit == Enum.BodyPart.LeftLeg then
print("Leg")
humanoid:TakeDamage(Config.LegDamage)
elseif hit == Enum.BodyPart.RightArm or hit == Enum.BodyPart.LeftArm then
print("Arm")
humanoid:TakeDamage(Config.ArmDamage)
elseif hit == Enum.BodyPart.Torso then
print("Torso")
humanoid:TakeDamage(Config.TorsoDamage)
elseif hit == Enum.BodyPart.Head then
print("Head")
humanoid:TakeDamage(Config.HeadDamage)
end
end
end
end
end)
RemoteEvents[4].OnServerEvent:Connect(function()
newHitbox:HitStart()
end)
RemoteEvents[3].OnServerEvent:Connect(function()
newHitbox:HitStop()
end)
RemoteEvents[1].OnServerEvent:Connect(function()
Values[3].Value += 1
end)
RemoteEvents[2].OnServerEvent:Connect(function()
Values[3].Value = 0
end)
Huh? What’s humanoid.ArmorAmount
?
For now change all of those lines to print(humanoid.Health)
Thank you but I don’t really need it
A feature that my sword combat system has.
Yeah replace them with the line I provided above.
What do you mean? What lines? The lines that it prints those numbers in the output?
Yeah, those lines! Send the results after that please
i think you need to add some functions
Alright good, now replace the lines like humanoid:TakeDamage(Config.ArmDamage)
to humanoid:TakeDamage(10)
for now
So now what? Should I wait or do something?
Yup, as I thought, there’s a problem with the damage values in that module script.
yeah? But why wasn’t it printing the body parts though?
I suggest not spamming the “elseif”, it reminds me of YandereDev, you can get lost easily and it’s not organized at all. However, good luck in resolving.