clicker = script.Parent.Parent.ClickDetector
local debounce = false
function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if (human ~= nil) and debounce == false then
debounce = true
local player = getPlayer(human)
if (player == nil) then return end
script.Parent:clone().Parent = player.Backpack
wait(2)
debounce = false
end
end
clicker.MouseClick:connect(onTouch)
This is when the player clicks the part, they get the weapon. It's not working. any help please?

2 comments
THIS DOESN'T EVEN WORK THO
tell output and dont use caps, please.