Kobertum
|
  |
| Joined: 04 Oct 2013 |
| Total Posts: 2335 |
|
|
| 16 Jun 2015 03:17 AM |
1 -- local door = script.Parent 2 -- local distance = 5 3 -- 4 -- while true do 5 -- for _, player in pairs(game.Players:GetPlayers()) do 6 -- mag = (player.Character.Torso.Position - door.Position).magnitude 7 -- 8 -- 9 -- if mag <= 15 then 10 -- door.Position = Vector3.new(0, 50, 0) 11 -- end 12 -- end 13 -- end
I cannot tell you what the Output says due to everytime I attempt to play solo or start a server, it crashes,
Roblox Developer Console says; 01:13:57 -- Script 'Workspace.Union.DistanceMeter', Line 5 which is this line; for _, player in pairs(game.Players:GetPlayers()) do
Help please? |
|
|
| Report Abuse |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 16 Jun 2015 03:21 AM |
| Yield in that while loop, so just add a wait(blah) under line 4 or above line 13 |
|
|
| Report Abuse |
|
Kobertum
|
  |
| Joined: 04 Oct 2013 |
| Total Posts: 2335 |
|
|
| 16 Jun 2015 03:22 AM |
thanks champ
i appreciate it tons, |
|
|
| Report Abuse |
|