gun = hit.Parent.ClassName("Tool")
function Touch(hit)
if gun.AmmoType.Value == "9x19mm" then
gun.StoredAmmo.Value = gun.StoredAmmo.Value + gun.MaxAmmo.Value
end
end
script.Parent.Touched:connect(Touch)
The script's parent is a part in workspace, what it's supposed to do is find the tool, and if its ammotype is the ammotype that the script is searching for, then it adds ammo, equivalent to the number of MaxAmmo.
However, it did not work. Please help?
