local com = ";remove gear"
players = game.Players:GetChildren()
game.Players.PlayerAdded:connect(function(player)
if player:GetRankInGroup(42142) >= 7 then
player.Chatted:connect(function(message)
if message == com then
game.players.StarterGear:ClearAllChildren()
end
end)
end
end)
local com2 = ";add SMG"
players = game.Players:GetChildren()
game.Players.PlayerAdded:connect(function(player)
if player:GetRankInGroup(42142) >= 7 then
player.Chatted:connect(function(message)
if message == com2 then
game.ServerStorage.Tools.SMG:Clone().Parent = game.players.StarterGear
end
end)
end
end)
On the ;remove gear command it removes starter gear. On the ;add SMG gear it adds the SMG gun to the starter gear. These commands don't work. Why is this?

3 comments
game.ServerStorage.Tools.SMG:Clone().Parent = player:findFirstChild("Backpack") on Line 23
Try parenting to the Backpack, and clearing from the Backpack aswell.
Remember :GetChildren() returns a table of the children. Also, using :GetPlayers() is a more definite way to know that you're recieving players in that table.