Still have questions? Join our Discord server and get real time help.
0

# Should I use local or server script for changing walk and idle animation?

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?

0
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. Marineboy3O8 97 — 7d
0
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. XX_Doggoa 24 — 7d

0
Prestory 1132
7 days ago

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)