Hey, great module! I’m considering using it for a combat system, but I have a question. If two players were to punch each other at the exact same time, how would the module handle that situation? Would I need to implement a workaround for such cases? I noticed it mentions ‘Debounces for same-character hits,’ but I’m not entirely sure what that entails. Thanks! Edit: Oops, I replied to the wrong person
Hey, nice module! Are we able to make pull requests?
pretty sure debounce for same-character hits means how long the wait till the hitbox can hit the same person again
Hi,
In my code, the hitbox.HitSomeone
event doesn’t fire in the server script when hitbox:Start()
is called on the client although the hitbox uses UseClient
. Is there a fix to this?
Is there a way to make the hitbox detect all parts of a character instead of only the humanoidrootparts? (nvm just used spatialoption inparts)
Hello ive already found a solution to my old problem. Although the hitbox does continue to function when spamming a m1 attack.
did i use this right guys (module)
function HitboxManager:UpdateHitbox(AttackType:SharedTable, Damage:number, Points:SharedTable, Time:number, Visible:boolean ,Function)
--local AttackType = {
-- Friendly = {NPC.character, FriendlyHumanoids}, --friendly humanoids
-- Style = "", --Kill, Custom function
-- Cframe = NPC.humRoot.CFrame+NPC.humRoot.CFrame.LookVector*1, --Position of Hitbox
-- Size = Vector3.new(10,10,10), --Size of Hitbox
-- HitboxStyle = "InBox", --"InBox" | "InRadius" | "InPart"
-- Time = 1, --Ragdoll time
-- DbTime = 999, --Hit debounce
-- AliveForce = 300, --Force
-- DeadForce = 700, --Force
-- Type = "", --cut, hit (death)
-- body = { --motor6d to cut
-- --[""] = true,
-- }
--}
self.hitboxParams = {
SizeOrPart = AttackType.Size, --Vector3 | number | BasePart
SpatialOption = AttackType.HitboxStyle, --"InBox" | "InRadius" | "InPart"
InitialPosition = AttackType.Cframe, --Vector3
Blacklist = {AttackType.Friendly},
DebounceTime = AttackType.DbTime,
Debug = Visible,
LookingFor = "Humanoid",
} :: HitboxTypes.HitboxParams
self.newHitbox.HitSomeone:Connect(function(hitChar)
print(hitChar)
local Hum = hitChar.Humanoid
local creator = humanoid:FindFirstChild("creator")
if creator then
creator.Value = AttackType.Friendly
else
creator = Instance.new("ObjectValue")
creator.Name = "creator"
creator.Parent = humanoid
creator.Value = AttackType.Friendly
end
if AttackType.Style == "Kill" then
Hum:TakeDamage(Damage)
if Hum.Health > 0 then
FightModule.Ragdoll(humanoid.Parent, true, AttackType.Time, AttackType.Cframe, AttackType.AliveForce)
else
Function(hitChar, Hum)
end
elseif AttackType.Style == "Custom" then
Function(hitChar, Hum)
end
end)
self.newHitbox:Start()
task.delay(Time, function()
self.newHitbox:Stop()
end)
end
hi, how would i make it so the hitsomeone only targets characters with a specific string value in them?