|
| 09 Aug 2014 07:25 PM |
this is supposed to spot whether someone's near a model, but it's only working on one model at a time (in an entire model)
interactSystem = function() for detect, item in pairs(workspace.targetFilter.items:GetChildren()) do coroutine.wrap(function() if item:IsA("Model") and item:FindFirstChild("MainGrip") then if math.abs(item.MainGrip.CFrame.x - user.Torso.CFrame.x) < 14 and math.abs(item.MainGrip.CFrame.y - user.Torso.CFrame.y) < 14 and math.abs(item.MainGrip.CFrame.z - user.Torso.CFrame.z) < 14 then if taking == false then range = true; target.Value = item; else range = false; end else range = false; end end end)() end end; |
|
|
| Report Abuse |
|
| |
| |