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

When playing an animation in player character, should you use a local script or a script?

I was wondering whether you should use a local script or a regular script when playing an animation in a player's character

Can other players see the animation if filtering enabled is on, and the animation is played on a local script?

2 answers

✓ Accepted answer

Yes. Because the character's Humanoid replicates to the server, playing animations locally will replicated to the server automatically. A rule of thumb is to do whatever you can on the client, as to not slow down the server. And because you can do this on the client, you should.

If you were going to play animations for NPCs that everyone would see, you could do this on the server. But in this case, play the animations locally and they'll replicate.

2 comments

0

Thank you!

0

Should changing a player's walk speed also be done in a local script instead of a regular script in FE?

I am almost 100% sure that animations can only be played from local scripts. As for the FE thing I have no clue sorry. My guess would be that FE doesn't impact the animation even if in a local script

1 comment

0

Just checked on wiki. They should be played in local script. Here is the artical: http://wiki.roblox.com/index.php?title=Animations It says this in the "Playing Animation in Player Character" section

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