I have built a drinks machine and now I want the players to have a tool added to their inventory when they click a button using a clickdetector. I put this local script in the ClickDetector:
local p = game.Players.LocalPlayer
local debounce = true
script.Parent.MouseClick:Connect(function(p)
local Backpack = p.Backpack
local Tool = game.ReplicatedStorage.Equipment.BottleDrinks.Cola1
local Clone = Tool:Clone()
Clone.Parent = Backpack
script.Disabled = true
wait(10)
script.Disabled = false
end)
Thank you very much for your great help ^^

1 comment
Use a debounce instead of script.Disabled. script.Disabled is unreliable.