of     1   

codboy22
#194292268Friday, July 22, 2016 6:33 PM GMT

19:31:43.582 - Players.codboy22.PlayerGui.Team Select.TEST.LocalScript:3: attempt to call a nil value local plr = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() if plr.Backpack:FindFirstChild('Springfield Rifle')('Scoped Kar98k') or plr.StarterGear:FindFirstChild('Springfield Rifle')('Scoped Kar98k') or game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle')('Scoped Kar98k') then if plr.Backpack:FindFirstChild('Springfield Rifle')('Scoped Kar98k') then plr.Backpack:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() end if plr.StarterGear:FindFirstChild('Springfield Rifle')('Scoped Kar98k') then plr.StarterGear:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() end if game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle')('Scoped Kar98k') then game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() wait(0.02) end end plr.TeamColor = BrickColor.new('Liy white') game.Workspace[plr.Name].Head:Destroy() end)
codboy22
#194292688Friday, July 22, 2016 6:38 PM GMT

2nd attempt (same error) local plr = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() if plr.Backpack:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') or plr.StarterGear:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') or game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') then if plr.Backpack:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') then plr.Backpack:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() end if plr.StarterGear:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') then plr.StarterGear:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() end if game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle') or ('Scoped Kar98k') then game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle')('Scoped Kar98k'):Destroy() wait(0.02) end end plr.TeamColor = BrickColor.new('Liy white') game.Workspace[plr.Name].Head:Destroy() end)
[rfa#hidefromsearch]
#194292922Friday, July 22, 2016 6:42 PM GMT

[rfa#hidefromsearch]
codboy22
#194293072Friday, July 22, 2016 6:44 PM GMT

self learn't
[rfa#hidefromsearch]
#194293177Friday, July 22, 2016 6:45 PM GMT

[rfa#hidefromsearch]
codboy22
#194294033Friday, July 22, 2016 6:58 PM GMT

19:55:30.230 - Players.codboy22.PlayerGui.Team Select.TEST.LocalScript:3: attempt to index a nil value same error, but with index in it! local plr = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() if plr.Backpack:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] or plr.StarterGear:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] or game.Workspace[plr.Name]:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] then if plr.Backpack:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] then plr.Backpack:FindFirstChild("Springfield Rifle")["Scoped Kar98k"]:Destroy() end if plr.StarterGear:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] then plr.StarterGear:FindFirstChild("Springfield Rifle")["Scoped Kar98k"]:Destroy() end if game.Workspace[plr.Name]:FindFirstChild("Springfield Rifle")["Scoped Kar98k"] then game.Workspace[plr.Name]:FindFirstChild("Springfield Rifle")["Scoped Kar98k"]:Destroy() wait(0.02) end end plr.TeamColor = BrickColor.new('Lily white') game.Workspace[plr.Name].Head:Destroy() end)
kools
#194294193Friday, July 22, 2016 7:00 PM GMT

Springfield Rifle doesn't exist. That's why it is complaining about indexing a nil value. [this] indexes something. Make sure that Springfield Rifle exists.
codboy22
#194294733Friday, July 22, 2016 7:07 PM GMT

im trying to destroy any weapons they carry when entering the lobby, but i can only do one weapon, hence this attempted script, which utterly failured
codboy22
#194294815Friday, July 22, 2016 7:08 PM GMT

failed*
codboy22
#194295331Friday, July 22, 2016 7:14 PM GMT

for example. this is will work for removing the britsh side gun local plr = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() if plr.Backpack:FindFirstChild('Springfield Rifle') or plr.StarterGear:FindFirstChild('Springfield Rifle') or game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle') then if plr.Backpack:FindFirstChild('Springfield Rifle') then plr.Backpack:FindFirstChild('Springfield Rifle'):Destroy() end if plr.StarterGear:FindFirstChild('Springfield Rifle') then plr.StarterGear:FindFirstChild('Springfield Rifle'):Destroy() end if game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle') then game.Workspace[plr.Name]:FindFirstChild('Springfield Rifle'):Destroy() end end plr.TeamColor = BrickColor.new('Lily White') game.Workspace[plr.Name].Head:Destroy() end)
codboy22
#194295596Friday, July 22, 2016 7:18 PM GMT

british*
codboy22
#194295922Friday, July 22, 2016 7:22 PM GMT

would there be a easier way to do this>
codboy22
#194297395Friday, July 22, 2016 7:41 PM GMT

that moment when your other script works, but the other doesn't https://www.youtube.com/watch?v=qBtO9Jk6Uck

    of     1