I'm trying to make a script that plays an Animation for the player who touches a Part, but nothing is happening. Please help!
local Animation = script.Parent.Animation
script.Parent.Touched:connect(function(hit)
local humanoid = hit.Parent:FindFirstChild('Humanoid')
if humanoid then
local Character = hit.Parent
local AniClone = Animation:Clone()
AniClone.Parent = Character.Humanoid
local animTrack = Character.Humanoid:LoadAnimation(AniClone)
animTrack:Play()
end
end)

3 comments
Are there any errors?
yes, (Animation "https://assetdelivery.roblox.com/v1/asset?id=5432167890&serverplaceid=0" failed to load in "Workspace.ffancyaxax12.Humanoid.Animation.AnimationId": Animation failed to load)
Is this a group game?