How i can use roblox animations for view model

Soo make Aiming animation played on view model align with head to look like ADS? thx for clarification, also last question, should i reuse one animation or load new one every time? does roblox automatically catches that?

Load the animation once and re-use the track, it’ll really save on memory.

local track = animator:LoadAnimation(animationInstance)
track.Looped = --whatever
track.Priority = Enum.AnimationPriority.--whatever

--now, just reuse it. These methods should help:
track:Play()
track:Stop()
track:AdjustSpeed(0)
track:AdjustSpeed(1)
track.IsPlaying
1 Like

and i need to do it every time i change view model right?

I mean, you could create an Object-Oriented system for a viewmodel controller and have methods to play animations on different viewmodels. This would help simplify the system.

But no, as long as they have been loaded once they will stay loaded as long as there are variables pointing to them in memory.

1 Like

i didn’t knew that if you load animation on one animator it will be loaded on another, thx for help, have a nice day

1 Like