So i am trying to make a gui button that gives player a tool. Script I am using is below. Roblox doesnt give me any script error. But the button doesnt give the tool to the backpack for some reason. Can someone tell me what am I doing wrong? Thanks
local debounce = true
script.Parent.mec.MouseButton1Down:Connect(function(player)
if debounce == true then
debounce = false
local tool = game.ReplicatedStorage.ClassicSword:Clone()
tool.Parent = player.Backpack
wait (2)
debounce = true
end
end)
