#How do i load Animation For Player?

24 messages · Page 1 of 1 (latest)

sudden forum
#

Anything will help

steel vigil
#

@sudden forum ```lua
wait(2) -- waiting for stuff to load in, you can do it other ways
local animation = script.Animation -- the animation, doesnt have to be script.Animation, just where ever the animation is yk
local animator = game.Players.LocalPlayer.Character.Humanoid.Animator -- the characters animator
local animationTrack = animator:LoadAnimation(animation) -- putting the animation inside the animator
animationTrack:Play() -- playing the animation

#

by the way game.Players.LocalPlayer will only work if its in a local script if you didnt know but this is how youd put an animation inside a players animator

sudden forum
steel vigil
sudden forum
#

(trying to make them on gui)

steel vigil
#

oh idk how to work guis

#

but you gotta wait for the character to losd

#

load

#

so you can do stuff with CharacterAdded or wait(2)

#

are there any errors?

sudden forum
#

ima check

#

oh

#

i fixed it man

#

thank you so much

steel vigil
#

np

#

the wait fixed it?

#

@sudden forum

sudden forum
#

yea

steel vigil
#

alr

steel vigil
#

oh @sudden forum one more thing, when the character dies/resets the animation wont be there anymore

#

so i recommend loading the animation each time the characters added

sudden forum