My script fires a remote event more than once and I don't know why!
local e = nil
local cooldown = true
local RS = game:GetService("ReplicatedStorage")
local Mouse = script.Parent.Parent.Parent:GetMouse()
script.Parent.Equipped:Connect(function()
e = true
Mouse.Icon = "rbxasset://textures/GunCursor.png"
script.Parent.Unequipped:Connect(function()
e = false
Mouse.Icon = "rbxasset://SystemCursors/Arrow"
end)
Mouse.Button1Up:Connect(function()
if e and cooldown == true then
local cooldown = false
local sus = Mouse.Target
if sus == "Head" or "Left Arm" or "Left Leg" or "Right Arm" or "Right Leg" or "Tail" or "Torso" then
RS.dogedamageclone:FireServer(sus)
end
wait(2.5)
local cooldown = true
end
end)
end)
I've done many things in the script, but I posted the whole thing because something might be messing up the end of the script.

1 comment
The variable "cooldown" was me trying to fix the script by the way,