huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 30 Nov 2011 06:36 AM |
Why won't this work?
Output:19:40:59 - Players.huner2.PlayerGui.GunStart.Frame.Pistol.LocalScript:5: attempt to index global 'tel' (a nil value) 19:40:59 - Script "Players.huner2.PlayerGui.GunStart.Frame.Pistol.LocalScript", Line 5
player = game.Players.LocalPlayer team = player.Character.Torso.Color tel = Workspace.Map:findFirstChild("team") function buy() local telel = tel:getChildren() local tele = telel[math.random(1, #telel)] local positive = game.Workspace.Map:findFirstChild(telel) local pos = positive.Positon if Workspace.GameAlive.Value == 0 then return end player.Character.Torso.Positon = pos end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 30 Nov 2011 06:42 AM |
~Bump~ Don't Ignore the squishy :3 |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:03 AM |
player = game.Players.LocalPlayer team = player.Character.Torso.Color tel = game.Teams:FindFirstChild("Team") function buy() local telel = tel:getChildren() local tele = telel[math.random(1, #telel)] local positive = game.Workspace.Map:findFirstChild(telel) local pos = positive.Positon if Workspace.GameAlive.Value == 0 then return end player.Character.Torso.Positon = pos end script.Parent.MouseButton1Down:connect(buy)
and whats this in, i presume a localscript, but whats its parent? |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2011 07:09 AM |
sorry, didn't read the script properly
player = game.Players.LocalPlayer team = player.Character.Torso.BrickColor -- Color isn't a value on its own tel = game.Workspace.Map:findFirstChild("team") -- it has to be game.Workspace function buy() local telel = tel:getChildren() local tele = telel[math.random(1, #telel)] local positive = game.Workspace.Map:findFirstChild(telel) local pos = positive.Positon if Workspace.GameAlive.Value == 0 then return end player.Character.Torso.Positon = pos end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|
|
| 30 Nov 2011 07:33 AM |
| well i didn't know that, but that doesn't mean i can't script |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 30 Nov 2011 05:01 PM |
| Uhh it still doesn't work and I'm getting the same output... |
|
|
| Report Abuse |
|
|