How do you exclude something from i, v in pairs?
Soooooo.... I wanna create a new part whenever the players are close enough to a part in the workspace. It applies to all the parts in the workspace. When I used i,v in pairs
, it won't work as there is Camera, Terrain in it. How do I exclude them out from i,v in pairs
?
01 | local plr = game.Workspace:FindFirstChild(script.Parent.Parent.Name) |
06 | for i, v in pairs (game.Workspace:GetChildren()) do |
07 | local mag = (plr.HumanoidRootPart.Position - v.Position).magnitude |
**Not the entire script. But it's the part that is being asked. :)