spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 03 Jan 2017 01:28 AM |
Tried to learn it and got the hang of it but how do i get all the players between the points?
|
|
|
| Report Abuse |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 03 Jan 2017 01:33 AM |
local region = -- your region here local map = -- your map here, so we can what's DEFINITELY not a player
function ScanTable(tab,val) for k,v in next,tab do if v == val then return false end end return true end function CapturePlayersInRegion(region) local players = {} for _,part in next,workspace:FindPartsInRegion3(region,map,math.huge) do if part.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(part.Parent) if player and not ScanTable(players,player) then table.insert(players,player) -- make sure we don't add the same player over and over again for multiple bodyaprts end end end print(table.concat(players)) return players end
|
|
|
| Report Abuse |
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
| |
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |