Animation plays even while walking

I’m trying to make custom emotes but it plays the animation but if I walk it still keeps playing
Here is the script:

game.Players.PlayerAdded:connect(function(Plr)
	Plr.Chatted:connect(function(msg)
		if msg == "/e Gdance" then
			local A = Instance.new("Animation", Plr.Character)
			A.AnimationId = "http://www.roblox.com/asset/?id=6768447515"
			local track = Plr.Character.Humanoid:LoadAnimation(A)
			track:Play()
		end
end)
end)

but it plays the animation but if I walk it continues. What can I do?

Welp there’s a simple way to do it. First clone the Animate from ur character to the StarterCharacterScript. Second, open the script and add the information into the table that’s called animNames. At the last, scroll down and u will see smth like this

local dances = {"dance1", "dance2", "dance3"}

-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

Type the name that u set in the animNames table to the dances table and emoteNames table. After that, it should works.

(I need to practice my English)

1 Like

could you make a video? I do not understand how to.

If I have time, I will make a video for u.

no need. I figured it out thanks!

no problem. If u need any help, text me here.