I made a Dash but I don’t know how to make a hitbox for it, I tried put a touched event but for some reason I couldn’t disconnect it, now i’m trying using getpartsinpart() and getpartsBoundInBox() but apparently the dash is too fast so the event don’t fires, here’s my script:
task.spawn(function()
while Z == true do task.wait()
for _, part in ipairs(workspace:GetPartBoundsInBox(Detect.CFrame,Detect.Size,overlapP)) do
if part.Parent.Name ~= player.Character.Name and part.Parent:FindFirstChild("Humanoid")
then
local humanoid = part.Parent.Humanoid
if humanoid:FindFirstChild(player.Name.."BsDash") then return
else
print("Dashed") humanoid:TakeDamage(10)
local Dbv = Instance.new("BoolValue")
Dbv.Name = player.Name.."BsDash"
Dbv.Parent = humanoid
game:GetService("Debris"):AddItem(Dbv,3)
end end end end end)