How could you change running animations in the middle of a game?
For example, if you’re holding a weapon you do the weapon hold run animation, but if you put the weapon down the default animation plays.
Only found solutions to make permanent preset running animations.
You could create a table place the animations in it or just define them and if they have the tool equipped then the run with tool animation plays
I’m pretty sure you have to edit the animation script in some way, because if you only did that then it would override jumping animations and all the other animations.
No. Not necessarily you can just choose which animation if you scripted it.
Well yeah you can choose which animation you want to play, but the animation script already handles when it should do what animation, which is why it’s 800 lines long. I’m looking for a way to change what animation it thinks it’s suppose to play. For example, take this section of code inside of the animation script
local animNames = {
idle = {
{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
},
walk = {
{ id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
},
run = {
{ id = "http://www.roblox.com/asset/?id=656118852", weight = 10 }
},
If you make your own animation script, you can easily change which animation you want to play for what. I’m looking for a way to change that mid-game, but since the animation script already sets all the animations when it first runs all the way through, I’m not sure how to do that.
Thinking about this deeper made me look into how it is configured. The animation script takes what you put into the table and sets this as the AnimationID of an Animation instance inside the child of the script, as shown below:
From there, you can easily just configure the animation ID of the animations to switch it in-game with an external script.