Bobb1118
|
  |
| Joined: 03 Oct 2008 |
| Total Posts: 476 |
|
|
| 28 Apr 2013 07:18 PM |
I'm having trouble giving more than one. all variables are properly defined
Game.Workspace.ChildAdded:connect(function(new) player = Game.Players:findFirstChild(new.Name) if player then if Weapon.Text == "M4A1" and Mod.Text == "" then print 'M4A1 Granted' w = game.Lighting.M4A1:Clone() w.Parent = player.Backpack elseif Weapon.Text == "ACR" and Mod.Text == "" then print 'ACR Granted' w = game.Lighting.ACR:Clone() w.Parent = player.Backpack elseif Weapon.Text == "AK-47" and Mod.Text == "" then print 'AK-47 Granted' w = game.Lighting.AK47:Clone() w.Parent = player.Backpack else print 'No primary' if Weapon2.Text == "RPG-7" and Mod2.Text == "" then print 'RPG-7 Granted' w = game.Lighting.RPG7:Clone() w.Parent = player.Backpack else print 'No secondary' end end end end)
I can have a primary, or the RPG, but not both it seems. Assuming when it finds one from the first list it just ends, how do I stop this? |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2013 07:21 PM |
| You have to end the first set of 'if' statements after "else print 'no primary'" |
|
|
| Report Abuse |
|
|
Bobb1118
|
  |
| Joined: 03 Oct 2008 |
| Total Posts: 476 |
|
|
| 28 Apr 2013 07:30 PM |
| I could have sworn I had this script the exact same way you decribed, but now thats its like that it works. thank you |
|
|
| Report Abuse |
|
|
Bobb1118
|
  |
| Joined: 03 Oct 2008 |
| Total Posts: 476 |
|
|
| 28 Apr 2013 07:31 PM |
now I need to figure out how to grant weapons based on stored table values or something..
|
|
|
| Report Abuse |
|
|