I know this script seems really simple and i feel dumb posting it here but it just isnt working

game.Workspace.touch.Touched:Connect(function(hit)
	game.Workspace.yes.animscript.Animation.AnimationId = "rbxassetid://4757925477"

end)

simple function script in which on touching the block (touch), the animation in the NPC (yes) will change to the ID one above, but the animation itself doesn't change

  • I get no errors when loading the game up or when touching the block

the NPC already has a script that plays an animation, since another animation is preset before the block is touched (animscript)

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()

Did I do it wrong or is this not just something possible?