I have a GUI and an image button that is once pressed, it will give the player an "AR" and a "Pistol", So the players don't abuse it and get infinite guns, How could I Make it so that it clears the player's backpack completely and then gives the player the two guns, I can't just say tool:destroy()
because I have multiple guns in the game so it wouldn't be convenient to do a remove a gun for every single gun in the game here's the code
script.Parent.MouseButton1Click:Connect(function() --Click detector
game.Lighting.AssualtRifles.AR:Clone().Parent =
game.Players.LocalPlayer.Backpack --Ar Giver
game.Lighting.Pistols.Pistol:Clone().Parent =
game.Players.LocalPlayer.Backpack --Pistol Giver
end)

1 comment
Omg Thank you! I never though about that idea tysm