-
What do you want to achieve? Keep it simple and clear!
I’m basically making a hitbox system that damages characters with humanoid that touches it and I need to make it damage multiple characters if multiple players touched it, but as well not damage them twice. -
What is the issue? Include screenshots / videos if possible!
I need help on how to make it, I’ve have tried to using table.insert/find but it just seems to not work or bug out, but any help would be appreciated.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried looking it up but the only thing that helped me was by using tables but it just doesn’t want to work for me.
Currently I have this script to damage a singular player only, I want to make this work to damage to multiple players without having damaging them twice.
repeat task.wait()
local HitTable = game.Workspace:GetPartsInPart(Part, Params)
for i,v in ipairs(HitTable) do
local Humanoid = v.Parent:FindFirstChildOfClass("Humanoid")
if Humanoid ~= nil then
script:WaitForChild("HitboxRemote"):FireServer(Humanoid)
Hum = Humanoid
break
end
end
until Destroy == true or Hum ~= nil