Hey there!
If i add a custom run animation, and someone on mobile goes slow, would the animation adjust to the speed?
Any help is appreciated!
Hey there!
If i add a custom run animation, and someone on mobile goes slow, would the animation adjust to the speed?
Any help is appreciated!
Hi, there,
I am c0nzx, and I found something on the roblox dev hub, that might answer your question.
https://developer.roblox.com/en-us/api-reference/function/AnimationTrack/AdjustSpeed#:~:text=However%20a%20trackâs%20Speed%20can,the%20length%20by%20the%20speed.
You can use AnimationTrack:Play.
I hope it helped, if it did make sure to mark my answer as solution, thanks, and enjoy developing!
No, it wouldnât iirc.
303030303030
Yes, the animation speed is adjusted based on the humanoids traveling speed. Just make sure you put this custom animation in walk as well as run, because the walk animation is what is played at slower speeds.
( If you are using the default animation script. )
Is there anyway i could make the animation speed adjust based on the humanoids travelling speed when using a custom script that simply plays the walk animation when the MoveDirectionâs magnitude is above 0?
You can likely just use the same code that is in the default script. When the humanoid walks, an event is fired passing a speed parameter. The animation speed is adjusted based on this speed parameter using some simple maths, and then played.
Thanks for the help @KeysOfFate @c0nzx.
I managed to adjust the speed of the animation according to the humanoidâs walkspeed by dividing the speed the humanoid is currently at by the humanoid WalkSpeed, setting the value as a variable called âAnimSpeedâ, and using :AdjustSpeed(AnimSpeed)
.
No problem, also credit roblox, their the one who let me use their developer source page! Haha! Good luck!