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