The button gui shows up when i equip the tool and goes away when i unequip the tool but when i click the button it doesnt reload but it says no errors in the output.. so can someone please help me out here, thanks..
local Button = script.Parent
enabled = true
function onClick()
if game.StarterPack:FindFirstChild("Del's Revolver").Ammo.Value ~= game.StarterPack:FindFirstChild("Del's Revolver").MaxAmmo.Value then
reloadsound = game.StarterPack:FindFirstChild("Del's Revolver").Handle:FindFirstChild("Reload")
if reloadsound then
reloadsound:Play()
end
enabled = false
game.StarterPack:FindFirstChild("Del's Revolver").VisibleB.Value = true
game.StarterPack:FindFirstChild("Del's Revolver").StringValue.Value = "Reloading"
repeat game.StarterPack:FindFirstChild("Del's Revolver").StringValue.Value = "Reloading" wait(0.3) game.StarterPack:FindFirstChild("Del's Revolver").Ammo.Value = game.StarterPack:FindFirstChild("Del's Revolver").Ammo.Value + 3 game.StarterPack:FindFirstChild("Del's Revolver").StringValue.Value = "Reloading" until game.StarterPack:FindFirstChild("Del's Revolver").Ammo.Value >= game.StarterPack:FindFirstChild("Del's Revolver").MaxAmmo.Value
game.StarterPack:FindFirstChild("Del's Revolver").Ammo.Value = game.StarterPack:FindFirstChild("Del's Revolver").MaxAmmo.Value
wait(0.2)
game.StarterPack:FindFirstChild("Del's Revolver").VisibleB.Value = false
enabled = true
end
end
Button.MouseButton1Click:connect(onClick)
