function onTouched(hit)
if (hit.Parent:FindFirstChild("Humanoid") ~= nil) then
local d = hit.Parent:GetChildren()
for i=1, #d do
if (d[i].className == "Tool") then
d[i].StoredAmmo.Value = d[i].MaxAmmo.Value
if script.Parent.Parent.Percentage.Value < 0 then
script.Parent.Parent:remove ()
else
script.Parent.Parent.Percentage.Value = script.Parent.Parent.Percentage.Value - 10
end
script.Sound:play()
script.Disabled = true
wait (10)
script.Disabled = false
end
end
end
end
script.Parent.Touched:connect(onTouched)
this was working less then 24 hours ago i cant figure whats wrong on it its saying the last end isnt working but it needs to be theres so i just need some help

2 comments
giv the exact error please
You should not be using script.Disabled it is very bad practice