I made several animations for my project, but when I attempt to run them they do not play, how could I fix this? Here is my code in a Local Script, and animation I am running has the Id in it for my animation.
local animation=game.Workspace.Anim1 np=game.Players.LocalPlayer np.Chatted:connect(function(msg) if msg==string.lower("atk") then local atk=np.Character.Humanoid:LoadAnimation(animation) atk:Play() end end)
Well, after reviewing this script several times, I only found an error in line 4.
local animation=game.Workspace.Anim1 np=game.Players.LocalPlayer np.Chatted:connect(function(msg) if msg:lower() == "atk" then local atk = np.Character.Humanoid:LoadAnimation(animation) atk:Play() end end)