I don't know if the question is right. I don't really know what's happening.
It only lets one person do it at a time and it continues the script if the other didn't finish it. I thought it was firing the remote event for everyone and I tried printing the players name to see when I click the tool it prints both there names but it doesn't, so I thought this couldn't be it.
https://gyazo.com/f238d52ed106d58c4eacb8601d279c2b https://gyazo.com/ca3f1ee72a66fc7e6efe50fcbdb31e73
local script
local tool = script.Parent local player = game.Players.LocalPlayer local debounce = false local debounce2 = false tool.Equipped:Connect(function() game.ReplicatedStorage.Events.M1CombatEvents.CombatIdleOn:FireServer() end) tool.Unequipped:Connect(function() game.ReplicatedStorage.Events.M1CombatEvents.CombatIdleOff:FireServer() end) tool.Activated:Connect(function() if player.Character and tool:IsDescendantOf(player.Character) then if player and player == game.Players.LocalPlayer and debounce == false then game.ReplicatedStorage.Events.M1CombatEvents.M1Event:FireServer() debounce = true wait(1) debounce = false end end end) tool.Activated:Connect(function() if player.Character and tool:IsDescendantOf(player.Character) then if player and player == game.Players.LocalPlayer and debounce2 == false then game.ReplicatedStorage.Events.M1CombatEvents.M1Event2:FireServer() debounce2 = true wait(1) debounce2 = false end end end)
server script
local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://7204285119" local PlayAnim local anim2 = Instance.new("Animation") anim2.AnimationId = "rbxassetid://7424052691" local PlayAnim2 local anim3 = Instance.new("Animation") anim3.AnimationId = "rbxassetid://7424918789" local PlayAnim3 game.ReplicatedStorage.Events.M1CombatEvents.CombatIdleOn.OnServerEvent:Connect(function(player) local hum = player.Character.Humanoid PlayAnim3 = hum:LoadAnimation(anim3) PlayAnim3:Play() end) game.ReplicatedStorage.Events.M1CombatEvents.CombatIdleOff.OnServerEvent:Connect(function(player) PlayAnim3:Stop() end) local debounce = false local debounce2 = false local doDamage = true local doDamage2 = true game.ReplicatedStorage.Events.M1CombatEvents.M1Event.OnServerEvent:Connect(function(player) local char = player.Character local hum = player.Character.Humanoid PlayAnim = hum:LoadAnimation(anim) if debounce == false then PlayAnim:Play() local rightarm = char["Right Arm"] rightarm.Touched:Connect(function(Hit) if not Hit:IsDescendantOf(player.Character) then if Hit:IsA("Part") or Hit:IsA("MeshPart") then local Humanoid = Hit.Parent:FindFirstChild("Humanoid") if Humanoid and doDamage == true and PlayAnim.IsPlaying then Humanoid:TakeDamage(10) doDamage = false end end end end) debounce = true wait(2) doDamage = true debounce = false end end) game.ReplicatedStorage.Events.M1CombatEvents.M1Event2.OnServerEvent:Connect(function(player) local char = player.Character local hum = player.Character.Humanoid PlayAnim2 = hum:LoadAnimation(anim2) if debounce == true and debounce2 == false and PlayAnim.IsPlaying == false then PlayAnim2:Play() local leftarm = char["Left Arm"] leftarm.Touched:Connect(function(Hit) if not Hit:IsDescendantOf(player.Character) then if Hit:IsA("Part") or Hit:IsA("MeshPart") then local Humanoid = Hit.Parent:FindFirstChild("Humanoid") if Humanoid and doDamage2 == true and PlayAnim2.IsPlaying then Humanoid:TakeDamage(10) doDamage2 = false end end end end) debounce2 = true wait(2) doDamage2 = true debounce2 = false end end)
So, as I said in the comment you should probably review the code and play animations from the client. That being said, after some "cleaning" of the script, here's how to fix the debounce problem. Instead of using a simple boolean, that would block execution for everyone, you could use an array of player IDs. For example, with a single debounce value:
local debounce = {} -- to check if player has debounce active if table.find(debounce, plr.UserId) then -- will execute if debounce is active, use 'not' for inverse -- to enable debounce for a player table.insert(debounce, plr.UserId) -- to disable debounce for a player table.remove(debounce, table.find(debounce, plr.UserId))