xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
|
| 14 Feb 2014 06:16 PM |
I want to make it only one person near you to get anchored, but if there is 2 people next to you it anchord both of them how do i make it so only one person gets anchored while the other is standing near me script:
for i = 1, #g do if g[i]:findFirstChild("Humanoid") and g[i]:findFirstChild("Torso") and player.Name ~= g[i].Name then if g[i].Humanoid.Health > 0 then if (g[i].Torso.Position - a.Position).magnitude <= 100 then print(g[i].Name) g[i].Torso.Anchored = true end end end end end
|
|
|
| Report Abuse |
|
|
xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
| |
|
|
| 14 Feb 2014 06:25 PM |
If u made this urself,thisll be easy to understand..
Plrsnear = 0 And then if Plrsnear == 0 then Plrsnear = 1 Something like that:) |
|
|
| Report Abuse |
|
|
xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
|
| 14 Feb 2014 06:26 PM |
| I did make this on my own.. Df.. |
|
|
| Report Abuse |
|
|
xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
| |
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 14 Feb 2014 06:41 PM |
Don't worry he's just trying to sound smart. I'm assuming you're getting players. Is A defined?
for _,plr in pairs(game.Players:GetChildren()) do if plr.Character then if (plr.Character:FindFirstChild("Humanoid")) and player.Character.Humanoid.Heakth > 0 then if (plr.Character.Torso.Position - a.Position).magnitude <= 100 then print(plr.Name) plr.Character.Torso.Anchored = true end end end end
|
|
|
| Report Abuse |
|
|
xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
|
| 14 Feb 2014 06:51 PM |
Yes A is defined as a Part in workspace
and a typo on the 3rd line: Heakth suppose to be Health
and how is this suppose to make only one person anchored if 2 people standing by me. They all get anchored, and i dont want that.
anyways thanks thou
|
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 14 Feb 2014 06:54 PM |
in = false for _,plr in pairs(game.Players:GetChildren()) do if plr.Character then if (plr.Character:FindFirstChild("Humanoid")) and player.Character.Humanoid.Health > 0 then if (plr.Character.Torso.Position - a.Position).magnitude <= 100 and not in then print(plr.Name) plr.Character.Torso.Anchored = true in = true end end end end
|
|
|
| Report Abuse |
|
|
xPoloBear
|
  |
| Joined: 10 Oct 2011 |
| Total Posts: 202 |
|
| |
|
|
| 14 Feb 2014 07:58 PM |
"in = false" "If not in then" "In = true" Hello?isn't that almost exactly what I said? "Plrsnear = 0" "If Plrsnear == 0 then" "Plrsnear = 1" .... "He's just trying to sound smart" And ur solution to it,was exactly what I said,only phrased diffrently "Plrsnear" "In" 0,false,1,true
Like cmon,gimme some credit.. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 14 Feb 2014 08:28 PM |
| Not that, just saying that he didn't make it himself. |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2014 08:37 PM |
| Oh,lol,THAT much I gathered..lol |
|
|
| Report Abuse |
|
|