if you want to make a continuing hitbox then i’d suggest you use Workspace:GetPartsinPart instead, (also never use touched for hitboxes, it’s terrible)
local hitamount = 10
local hitcooldown = 0.1
local overlapparams = OverlapParams.new()
overlapparams.FilterType = Enum.RaycastFilterType.Exclude
overlapparams.FilterDescendantsInstances = {player.Character}
for i = 0, hitamount do
task.spawn(function()
for i,v in pairs(workspace:GetPartsInPart(ultPart, overlapparams)) do
if v.Name == "HumanoidRootPart" and v.Parent:FindFirstChild("NPCHumanoid") then
hum:TakeDamage(10)
end
end
end)
task.wait(hitcooldown)
end
that’s really odd… it should’ve worked? try this
local hitamount = 10
local hitcooldown = 0.1
for i = 0, hitamount, 1 do
task.spawn(function()
for i,v in pairs(workspace:GetPartsInPart(ultPart)) do
if v.Name == "HumanoidRootPart" and v.Parent:FindFirstChild("NPCHumanoid") then
v.Parent.NPCHumanoid:TakeDamage(10)
end
end
end)
task.wait(hitcooldown)
end
thank you so much! it actually does work, the only problem is that i have some issues with the cooldown, it’s charshin roblox studio, i think i might know how to fix it so ill just try to do it myself but thank you very much