So, I have a about 5 tools I want to be able to do this with. I wrote this code as a short example of what will happen when the username is typed in and a tool is clicked. (Example: Shotgun)
local p = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() local tool = script.Parent.Shotty:Clone() tool.Parent = p.Backpack end)
The thing is I don't know how to go about telling a script to get a player's user and give them a tool. Can someone help me please? Thank you.