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!
I want to make hitbox which checking is on hitbox any attacking enemy -
What is the issue? Its doesnt work, litterly no founding enemy
-
What solutions have you tried so far? Tried to ask here: How to check if the player is touching & not touching a part?, but no one answer
Script
local touchingParts = workspace:GetPartBoundsInBox(hitbox.CFrame * hitbox.PivotOffset, hitbox.Size)
for v, part in pairs(touchingParts) do
local enemy = part.Parent
if enemy and enemy.Name ~= character.Name then
local enemyhumanoid = enemy:FindFirstChildOfClass("Humanoid")
if enemyhumanoid then
local enemyrootpart = enemy.Parent:FindFirstChild("HumanoidRootPart")
if combo < 4 then
enemyhumanoid:TakeDamage(3)
stunner:stun(1.4, enemy)
elseif combo >= 4 then
lasthitted = true
enemyhumanoid:TakeDamage(4)
stunner:stun(4, enemy)
end
end
end
wait(0.15)
break
end