#M2 punch animation is being cut off?
1 messages · Page 1 of 1 (latest)
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)```
can I see your server script to diagnose the problem?
Did you make sure to make the animation priority of the second punch higher than the priority of your idle
how do you do that?/ what does that mean
my idle animation is set to idle
theres 4 action ones whouls i go to action 2?
You could use action or action 2. You just need something higher than the idle. (Action2 is higher priority than action for example)