How would I use one RemoteEvent to give a player tools that they select from a GUI? This is the current code I have in a server script and was considering making a RemoteEvent for each tool.
game:GetService("ReplicatedStorage"):WaitForChild("CantinaRemoteEvents"):WaitForChild().OnServerEvent:Connect(function(player)
local clone = game:GetService("ReplicatedStorage"):WaitForChild("CantinaItems"):WaitForChild("RoastedWomprat"):Clone()
clone.Parent = player.Backpack
end)```
it is so easy just when you fire the remote event from the client give it the tool name and put all the tools in a folder in the replicated storage and use the :FindFirstChild method to find the tool in the folder
like this RemoteEvent:FireServer(tool.Name) and from the server RemoteEvent.OnServerEvent:Connect(function(player , Tool)
the tool is the tool name and the player is a value that the remote event will give on it is own
end)