#M2 punch animation is being cut off?

1 messages · Page 1 of 1 (latest)

unkempt terrace
#

in the animation it shows a full punch, but when i saved to roblox and added it to script it cuts off the punch and makes it look different? it is cutting off the second punch and not showing the whole thing?

#
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")

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


local M1, M2
local success, err = pcall(function()
    M1 = humanoid:LoadAnimation(script.Animations.M1)
    M2 = humanoid:LoadAnimation(script.Animations.M2)
end)
if not success then
    warn("Failed to load animations: " .. tostring(err))
    return
end

local combo = 0

UIS.InputEnded:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        print("punch - combo: " .. combo)
        
        if combo == 0 then
            game.ReplicatedStorage.MainEvent:FireServer()
            M1:Play()
            combo = 1
            
        elseif combo == 1 then
            game.ReplicatedStorage.MainEvent:FireServer()
            M2:Play()
            print("punch 2")
            spawn(function()
                task.wait(0.5)
                combo = 0
            end)
        end
    end
end)```
eager notch
#

can I see your server script to diagnose the problem?

boreal fossil
unkempt terrace
#

my idle animation is set to idle

#

theres 4 action ones whouls i go to action 2?

boreal fossil
unkempt terrace
#

i set it as action 2 but still didnt work

#

i made a 3 hit system and the third one works fine