How to use GetPartsInPart() properly?

Hey! So, I asked this question like a few days ago but I havent used it until now, I still cant understand it… I’m trying to make hitboxes btw.


image
I thought this was how it worked to detect what parts were in the newspike or what parts were touching it or something…

2 Likes

GetPartsInPart returns a table of everything inside that part so you need to use a for loop

local parts = workspace:GetPartsInPart(newSpike)
for i, part in pairs(parts) do

end
6 Likes