#combat animations not working for some reason

1 messages · Page 1 of 1 (latest)

tired cradle
#

I made a animation put the asset id but its saying this

Animations is not a valid member of LocalScript "Players.AndrewTheBoss0805.Backpack.CombatClient"

Code:
lua 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.Animations.M1)
local M2 = humanoid:LoadAnimation(script.Animations.M2)
local M3 = humanoid:LoadAnimation(script.Animations.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 cooldown == true then return end
if lastcooldown == true then return end
spawn(function()
cooldown = true
task.wait(.63)
cooldown = false
end)
if combo == 3 then
game.ReplicatedStorage.MainEvent:FireServer()
M3:Play()
spawn(function()
lastcooldown = true
task.wait(2.3)
lastcooldown = false
end)
spawn(function()
task.wait(.1)
combo = 1
end)
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)

#

asset id rbxassetid://132315492064841