Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why my Animation plays in studio but does not when played in regular mode?

=Overview= Plays an animation(regular script, place is fe)

=Problem= Works in studio but not when played

=Script=

	local animation = Instance.new("Animation")
	animation.AnimationId = 'rbxassetid://616005223'
	animTrack = Character:WaitForChild('Humanoid'):LoadAnimation(animation)
	animTrack:Play()

2 comments

2

You don't define Character.

0

that isnt the full script

1 answer

Your problem is simple. Animations can only be played through a localscript. Move that to a localscript and you should be fine.

This discussion is preserved as it was. New answers, comments, and votes are closed.