#I need help with my script

1 messages · Page 1 of 1 (latest)

stark helm
#

So I was making a combat script and tried too add knock back for my 4th m1 using aligned position it started messing up so I took it out the script after I did that my script started messing up whenever I hit the dummy he falls through the floor and the push forward effect I added is also gone

#

Heres also my cilent script

local UIS = game:GetService("UserInputService")

local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

humanoid.MaxHealth = 125
humanoid.Health = 125

local M1 = humanoid:LoadAnimation(script.Animations.M1)
local M2 = humanoid:LoadAnimation(script.Animations.M2)
local M3 = humanoid:LoadAnimation(script.Animations.M3)
local M4 = humanoid:LoadAnimation(script.Animations.M4) -- New one

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 cooldown or lastcooldown then return end

    task.spawn(function()
        cooldown = true
        script.Swing:Play()
        task.wait(0.35)
        cooldown = false
    end)

  
    if combo == 4 then -- NEW 4th attack
        game.ReplicatedStorage.MainEvent:FireServer()
        M4:Play()
        task.spawn(function()
            lastcooldown = true
            task.wait(1.4) -- Slightly longer cooldown for finishing move
            lastcooldown = false
        end)
        task.spawn(function()
            task.wait(0.1)
            combo = 1 -- Reset combo
        end)

    elseif combo == 3 then
        game.ReplicatedStorage.MainEvent:FireServer()
        M3:Play()
        combo = combo + 1

    elseif combo == 2 then
        game.ReplicatedStorage.MainEvent:FireServer()
        M2:Play()
        combo = combo + 1

    elseif combo == 1 then
        game.ReplicatedStorage.MainEvent:FireServer()
        M1:Play()
        combo = combo + 1
    end
end

end)

#

PLEASE SAVE MEcrying

stark helm
#

It was alot

lucid gateBOT
#

studio** You are now Level 2! **studio