I have made a script that will play a sound effect and an animation if you say a certain phrase. There are no errors, and the sound is playing fine. However, the animation is not playing. Any help is appreciated.
local hello = {"hello", "hi", "hoi", "sup"}
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local can = true
for _, text in pairs(hello) do
if can then
local contains = string.match(msg:lower(), text)
if contains ~= nil then
can = false
local s = Instance.new("Sound", plr.Character.Head)
s.SoundId = "rbxassetid://138632881"
s:Play()
local a = Instance.new("Animation")
a.AnimationId = "rbxassetid://05141525851"
local la = plr.Character.Humanoid:LoadAnimation(a)
la:Play()
end
end
end
end)
end)
The animation is owned by the group that made the game. Like I said, there was nothing in output whereas there would’ve been an error if I did not own the animation.
If you use the Standard Animation Plugin then once you click the 3 dots “…” on the top left then you will see Animation Priority and im not sure what they do but I mostly make the Animation Priority to Movement.