But when I touch the part, it gives multiple of the same tool at once, can you help me with this?
Here is the script I used:
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Humanoid then plr = game.Players:GetPlayerFromCharacter(hit.Parent) local gravity = game.ReplicatedStorage.Gun:Clone() gravity.Parent = plr.Backpack end
end)
Debounce.
local debounce = false script.Parent.Touched:Connect(function(hit) if hit.Parent.Humanoid then if debounce == true then return end debounce = true plr = game.Players:GetPlayerFromCharacter(hit.Parent) local gravity = game.ReplicatedStorage.Gun:Clone() gravity.Parent = plr.Backpack wait(0.7) debounce = false end end)