alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 04 Jul 2014 08:08 PM |
this doesnt work, it doesnt even print("Touched spawns")
function getSpawns() for i,v in pairs(game.Workspace.SpawnBox:GetChildren()) do if v:IsA("SpawnLocation") then AllSpawns = v end end end
function hit(h) pppp = game.Players:FindFirstChild(h.Parent.Name) print("Touched spawns") if gameGo.Value == true then table.remove(PlayersAlive, pppp.TableLocation.Value) print("removed plr from position:"..pppp.TableLocation.Value) end end
getSpawns() AllSpawns.Touched:connect(hit) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 08:12 PM |
for i,v in pairs(game.Workspace.SpawnBox:GetChildren()) do if v:IsA("SpawnLocation") then v.Touched:connect(function(h) pppp = game.Players:FindFirstChild(h.Parent.Name) print("Touched spawns") if gameGo.Value == true then table.remove(PlayersAlive, pppp.TableLocation.Value) print("removed plr from position:"..pppp.TableLocation.Value) end end) end end |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
| |
|
|
| 04 Jul 2014 08:14 PM |
function getSpawns() for i,v in pairs(game.Workspace.SpawnBox:GetChildren()) do if v:IsA("SpawnLocation") then AllSpawns = v AllSpawns.Touched:connect(function(Toucher) if Toucher.Parent and game.Players:FindFirstChild(Toucher.Parent.Name) then function hit(h) Player = game.Players:FindFirstChild(Toucher.Parent.Name) print("Touched spawns") if gameGo.Value == true then table.remove(PlayersAlive, pppp.TableLocation.Value) print("removed plr from position:"..pppp.TableLocation.Value) end end end end) end end end getSpawns()
|
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 04 Jul 2014 08:22 PM |
Still didnt work. I just did this instead:
function hit(h) if h.Parent:findFirstChild("Humanoid") then Player = game.Players:FindFirstChild(h.Parent.Name) print("Touched spawns") if gameGo.Value == true then table.remove(PlayersAlive, pppp.TableLocation.Value) print("removed plr from position:"..pppp.TableLocation.Value) end end end
spawns = game.Workspace.SpawnBox spawns.one.Touched:connect(hit) spawns.two.Touched:connect(hit) spawns.three.Touched:connect(hit) spawns.four.Touched:connect(hit) spawns.five.Touched:connect(hit) spawns.six.Touched:connect(hit) spawns.seven.Touched:connect(hit) spawns.eight.Touched:connect(hit) spawns.nine.Touched:connect(hit) |
|
|
| Report Abuse |
|
|