local Debounce = false
local tool = script.Parent
local player = script.Parent.Parent.Parent
function onTouched(hit)
if not Debounce then
tool.Activated:Connect(function()
player.leaderstats.Gems.Value = player.leaderstats.Gems.Value + 1
end)
Debounce = true
wait(.2)
Debounce = false
end
end
script.Parent.Handle.Touched:connect(onTouched)
Here is the script. i dont know why it dosent work im a beginner. please help.

1 comment
I see I'll start writing an answer