Basically i'm trying to make a players walk and idle animation change when they equip a tool. Is it possible to do this with a local script and have it show to everyone else or no?
COMMUNITY QUESTION
Should I use local or server script for changing walk and idle animation?
1 answer
Here is how you could do this using a Server Script insert a Server Script into ServerScriptService and insert the code below into the Script
game.Players.PlayerAdded:Connect(function(player)
local Character = workspace:WaitForChild(player.Name)
local Animate = Character:WaitForChild('Animate')
local Walk = Animate:WaitForChild('run'):WaitForChild('RunAnim') -- Walk Anim
Walk.AnimationId = 0 -- replace "0" with animation Id
local Idle = Animate:WaitForChild('idle'):WaitForChild('Animation1') -- Standing
Idle.AnimationId = 0 -- replace "0" with animation Id
local Idle2 = Animate:WaitForChild('idle'):WaitForChild('Animation2') -- Looking Around
Idle2.AnimationId = 0 -- replace "0" with animation Id
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You would have to edit the default "Animate" script (which is a local script) by adding a new animation to it and adding a function which would allow that animation to run depending a certain variable. Then put it in "StarterCharacterScripts" and it will override the one that is in the player by default.
I don't quite get what you mean by this, yes I know I have to mess with the normal animation script but should I use a local or server to change it.