"missing argument #2" error

local function checkIfAllPlayersAreInsideAPart(part)
for i, v in pairs(game.Players:GetPlayers()) do
if v.Character then
local partsTouching = v.Character.HumanoidRootPart:GetTouchingParts()

  	if table.find(partsTouching) == nil then
  		v.Character.Humanoid.Health = 0
  	end
  end

end
end

The following code gives an error saying “missing argument #2

I see the issue. I forgot to include the part into the “table.find(partsTouching)”, my mistake.

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