I'm trying to make random animations every time someone equips a tool in local script but it's not working, any idea whats wrong with this?
Edit: fixed it, is this good?
local animations = {"127487", "242579", "189476", "247846"}
function test()
animation = Instance.new("Animation", script.Parent.Parent.Parent)
animation.AnimationID = "http://www.roblox.com/asset?id="..animations[math.random.(1, #animations)]"
AT = script.Parent.Parent.Parent.Humanoid:LoadAnimation(animation)
AT:Play()
end
end
script.Parent.Equipped:connect(test)
