I alr make the m1 system with a tutorial, but now I want to make a block system and I cant because when I need to change the combat client or the server combat script the m1s stop working, so I am searching for someone that could help me, the combat client local script is this:
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local M1 = humanoid:LoadAnimation(script.Animaciones.M1)
local M2 = humanoid:LoadAnimation(script.Animaciones.M2)
local M3 = humanoid:LoadAnimation(script.Animaciones.M3)
local combo = 1
local cooldown = false
local lastcooldown = false
UIS.InputEnded:Connect(function(I,E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
if character:FindFirstChild("Stunned") then return end
if cooldown == true then return end
if lastcooldown == true then return end
spawn(function()
cooldown = true
script.Swing:Play()
task.wait(.65)
cooldown = false
end)
if combo == 3 then
game.ReplicatedStorage.MainEvent:FireServer("Last")
M3:play()
spawn(function()
lastcooldown = true
task.wait(1.3)
lastcooldown= false
end)
spawn(function()
task.wait(.1)
combo = 1
end)
elseif combo == 2 then
game.ReplicatedStorage.MainEvent:FireServer("Regular")
M2:play()
combo = combo + 1
elseif combo == 1 then
game.ReplicatedStorage.MainEvent:FireServer("Regular")
M1:play()
combo = combo + 1
end
end
end)