I am attempting to handle hitboxing with GetPartsInPart. I am planning on changing to getpartsbound soon but just wanted to get this down first. I am almost there but my table identifies each part of the rig and deals damage according to how many parts it got in the box. I tried fixing this through creating a separate table that keeps track of what players have been hit but I was unsuccessful in that. If anyone has any tips or ideas for me, they would be greatly appreciated.
local parts = workspace:GetPartsInPart(hitbox)
for y, x in ipairs(parts) do
local humanoid = x.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(5)
end
end
There is more script but I think this is enough for you to understand the part I am having trouble with.