So this script makes a Part and then finds all other parts inside said Part then locates the Humanoids, I plan to make it so the localplayer's humanoid is ignored, but the For i, v in pairs loop doesn't even work idek why.
Player = game:GetService("Players").LocalPlayer
Mouse = Player:GetMouse()
Mouse.Button1Down:Connect(function()
if Player.Character then
local Part = Instance.new("Part", Player.Character)
Part.Anchored = true
Part.CanCollide = false
Part.Size = Vector3.new(25, 25, 25)
Part.CFrame = Player.Character.Head.CFrame
print("Part Created")
for i, v in pairs(Part:GetTouchingParts()) do
print("Loop Started")
local IfHumanoid = v.Parent:FindFirstChild("Humanoid")
if IfHumanoid ~= nil then
print("Found Humanoid")
end
end
end
end)
It Doesn't print "Loop Started" in the output

5 comments
I feel like its a stupid mistake
does it print part created
yes
that means there are no touching parts
https://gyazo.com/22ec0ec41f2b7f9008a958d999fe773c but there is.