Hitboxing with GetPartsInPart assistance

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.

1 Like

I eventually figured it out through trial and error. It was through making a separate table, I just wasn’t doing it correctly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.