|
| 02 Apr 2015 12:05 PM |
| So I need a script in a part that runs through all players, and everytime a player is closer than 5 studs away, it returns true. It would return true twice if two players at the same time came close enough.. How do I do this with .magnitude. :/ |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Apr 2015 03:16 PM |
Just an attempt, but...
local p = game.Players:GetPlayers()
local currentp = nil
for i = 1, #p do
currentp = p[i] otherp = #p - 1
for i = 1, otherp do if currentp.Character.Torso.magnitude - otherp.Character.Torso.magnitude < 5 then --the thing you want to put in here end end
It probably is very wrong, but I did it quite quickly. |
|
|
| Report Abuse |
|
|
| |
|