Script to block certain emotes

I made a script that blocks certain emotes.

-- Put this into StarterCharacterScripts

local bannedEmotes = {} -- Banned Animation Ids Go Here

game:GetService("RunService").RenderStepped:Connect(function()
	for _,anim in pairs(script.Parent:WaitForChild("Humanoid"):WaitForChild("Animator"):GetPlayingAnimationTracks()) do
		for _,id in pairs(bannedEmotes) do
			if anim.Animation.AnimationId == "http://www.roblox.com/asset/?id="..id then
				anim:Stop()
			end
		end
	end
end)

this script is from over a year ago, but I followed comsurg’s advice and updated it.

What would be the point of this, when you could just turn off the emote wheel entirley? Still cool though

2 Likes

I mean it makes sense if he wants a certain emote to be used instead of disabling the whole emote wheel.

1 Like
  1. while wait() do is bad practice and can break at any time
  2. wait should not be used, try task.wait instead
  3. don’t be afraid of redefining _
3 Likes