Hello! The text below this message is a script that changes your avatar animations after you step on a part. I haven't really figured out what is causing the problems, but I think it has to do something with time delay between animations; example: if you jumped for a long period of time, an error will appear in output. I didn't say that I'm also new to scripting and bad at fixing stuff. So, does anyone have a solution about what a proper version should look like?
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil then
local h = hit.Parent:findFirstChild("Humanoid")
local anim = hit.Parent.Animate
anim.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id="
anim.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id="
anim.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id="
anim.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id="
anim.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id="
anim.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id="
anim.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id="
anim.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id="
anim.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id="
end
end
script.Parent.Touched:connect(onTouched)
Output Error: AnimationTrack limit of 256 tracks for one Animator exceeded, new animations will not be played.

3 comments
Also, if this would be multiplayer, you may need a more complicated script to make it so that two players can walk on it at the same time and not one of them not being able to get the animation.
Thank you for the script! Pretty much all i needed for it to work.
Your welcome!