I am using this script for my Giver:
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
game.Lighting.HyperLaser:clone().Parent = player.Backpack
wait(5)
debounce = false
end
end
script.Parent.Touched:connect(onTouch)
This used to work but all the sudden it doesnt work at all :( I have no idea what is wrong can you guys help me?

1 comment
Any error in the output?