Tool animation wont play

For debugging, I made the Animation sure to be in the Character, I also made it Archivable, set a name, AND made it output the animation ID, so that we know FOR SURE what’s going on :slight_smile:

script.Parent.Activated:Connect(function()
local player = game:GetService("Players"):GetPlayerFromCharacter(script.Parent.Parent)
local Animation = Instance.new("Animation")

Animation.Parent = player.Character
Animation.AnimationId = "rbxassetid://1006452225"
Animation.Name = "Drink"
Animation.Archivable = true
wait()
local AnimationLoaded = player.Character.Humanoid:LoadAnimation(Animation)
AnimationLoaded:Play()

print("Played Animation. Animation ID: "..Animation.AnimationId)
end)

I agree with you. The animation is ran using an r15 rig but OP is using an r6 rig to create the animation.

Alright, to start like @Sarlex0 said I change the game to force me into an r6 avatar, then I changed the current script in place to the one @yewfor said. Here is what I got: the animation still didn’t play. I got this in the output

You are now using different ID of the animation than earlier in this discussion, did you make another animation or?

No, I made it so your avatar is r6 when you join the game, should I make an animation for r15 and try it with normal settings?

1 Like

Yeah, I guess it won’t hurt making r15 animation

After making the R15 animation and adding it to the script it is still not working. Still getting same response as before from output.

Have you tried simply restarting the studio or try it on an empty baseplate? roblox glitches only rarely but otherwise I have no idea what is wrong with your soda

I am saying this because I have made myself an animation and script and it works normally
my script:

wait(1)
local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
local humanoid = player.Character:WaitForChild("Humanoid")
local animation = script.Parent.Animation
local debounce = false

local function click()
	if debounce == false then
		debounce = true
		local anim = humanoid:LoadAnimation(animation)
		anim:Play()
		wait(1.5)
		debounce = false
	end
end

tool.Activated:Connect(click)

my tool:
image

proof:

3 Likes

I just used the exact same script and have the exact same explorer, here is a video of my entire studio of me showing the explorer, script, and what happens when I click play, this is on a totally different baseplate:


It might be a studio issue now. Your script is perfectly fine, so try restarting studio.

Just forgot to set new animation to action, it is working now thank you all for your efforts!

1 Like

I was working on an animation yesterday, and it did not play. The problem was that I was in team create and was playtesting locally. After going into the actual game to test or using team test, the animation was playing.

If anyone finds this topic, this answer might help them.

1 Like