Emote Tool not working?

I tried making a tool that plays an animation on the character when you use it/activate it. doesn’t seem to be working however…

local tool = script.Parent
local player = game.Players.LocalPlayer

function onActivated()
local character = player.Character
local humanoid = character:FindFirstChild(“Humanoid”)

local animation = Instance.new(“Animation”)
animation.AnimationId = “http://www.roblox.com/asset/?id=8254829738

local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()
end

tool.Activated:Connect(onActivated)

any help would be appreciated :slight_smile:

The animation you’re using is content deleted. There is no way of retrieving it, you will need to use a new animation in place of the deleted one. The link leads to a 404.

are you sure its content deleted? this was the emote i was trying to use:
https://www.roblox.com/library/8254829738/conga-foolskarp

nnnnnope. i just checked and there doesnt seem to be any

local tool = script.Parent

local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8254829738"

local track = humanoid:LoadAnimation(animation)
repeat task.wait() until track.Length > 0

local function onActivated()
	track:Play()
end

local function onUnequipped()
	track:Stop()
end

tool.Activated:Connect(onActivated)
tool.Unequipped:Connect(onUnequipped)

You had the wrong animation ID, also here’s a better way to set up the script.