Voice chat thing is not working?

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. :slight_smile:

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)
2 Likes

Is the animation owned by the game owner if not then thats the problem

2 Likes

make sure you own the animation and that the animations priority is set to action (so it overrides all other animations)

1 Like

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.

I dont think it would give an error but whats the Animation priority? Try Action and Movement.

1 Like

What do they do?
How can I use them?

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.