You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
Im trying to make multiple boxes that acts as hitboxes for more easier hits but the problem is after some times it keeps adding more damage than the supposed 15
function Slash() -- M1 ABILITY
--[[local Speed = 40
local Force = 80000
local TotalForce = Force
local KnockBack = Instance.new("BodyVelocity")
KnockBack.Parent = part.Parent:FindFirstChild("HumanoidRootPart")--part is the target of the knockback/ the opponent
KnockBack.MaxForce = Vector3.new(TotalForce,TotalForce,TotalForce)
KnockBack.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.LookVector * Speed -- based on the direction YOUR character is facing.]]
if canM1 and AllLocked == false then
if Configuration.Stats.Linked_Sword.Value == true then
print("Swing")
canM1 = false
M1Anim:Play(0)
local hitTble = {}
AllLocked = true
M1Anim:GetMarkerReachedSignal("HITBOX"):Connect(function()
local atch = Instance.new("Attachment")
atch.Parent = Character.HumanoidRootPart
local hitbox = hitboxMod.create(atch.WorldCFrame*CFrame.new(0,0,-3), Vector3.new(6, 5, 4), 0.125)
hitbox.Touched:Connect(function(hit)
local victim = hit.Parent
if victim:FindFirstChildWhichIsA("Humanoid") and not table.find(hitTble, victim) and victim ~= Character then
table.insert(hitTble, victim)
print(hitTble)
hitbox.BrickColor = BrickColor.new("Lime green")
-- print(victim)
game.ReplicatedStorage.Events.Damage:FireServer(victim,M1Dmg)
end
end)
task.wait()
end)
task.wait(M1Anim.Length+0.05)
AllLocked = false
task.wait(durationM1-M1Anim.Length-0.05)
canM1 = true
end
end
end