So anyway I made two tool givers GUI, one gives a knife and pistol, the other a AWP and bloxy cola however clicking on one of those two tool giver GUI's will both give It to them, A example, If I clicked the GUI to give me the knife Instead of the pistol, It will give me the knife but also the gun as well, happens vise-versa
server script In ServerScriptService:
local Rep = game:GetService("ReplicatedStorage")
local event = Rep.RemoteEvent
local descendants = Rep.Weapons:GetDescendants()
local function giveTools(player)
for index, descendant in pairs(descendants) do
if descendant.Name == "Average knife" or descendant.Name == "Pistol" then
local weaponsToGive = descendant:Clone()
weaponsToGive.Parent = player.Backpack
end
end
end
event.OnServerEvent:Connect(giveTools)
local function giveTools(player)
for index, descendant in pairs(descendants) do
if descendant.Name == "AWP" or descendant.Name == "Bloxy Cola" then
local weaponsToGive = descendant:Clone()
weaponsToGive.Parent = player.Backpack
end
end
end
event.OnServerEvent:Connect(giveTools)

6 comments
Its not working sorry
Are there any errors?
No, sorry If I responded late, It just won't appear In the backpack (StarterGear)
Also the local script:
Also the local script: local button = script.Parent local ScrollingFrame = script.Parent.Parent.Parent local Rep = game.ReplicatedStorage button.MouseButton1Click:Connect(function() ScrollingFrame.Visible = false Rep.RemoteEvent:FireServer(game.Players.LocalPlayer) end)
Ah I see the problem. Change line 21 to event.OnServerEvent:Connect(giveTools, player, toolsType)