Hey i’m DevFoll and i don’t understand how my script doesn’t work i perfectly spelled the name right and added value at the end. My script:
local Mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.Equipped:Connect(function()
Equipped = true
Mouse.Button1Down:Connect(function()
ButtonDown = true
while ButtonDown == true and Equipped == true and script.Parent.Ammo.Value > 0 do
script.Parent.RemoteEvents.Fire:FireServer(Mouse.Hit.Position)
wait(0.1)
end
if script.Parent.Ammo.Value <= 0 then
script.Parent.RemoteEvents.OutOfAmmo:FireServer()
end
ButtonDown = false
end)
end)
Mouse.Button1Up:Connect(function()
ButtonDown = false
end)
script.Parent.Unequipped:Connect(function()
Equipped = false
end)
Pic of tool: