I have a script that changes a players animation IDs, they apply fine on the players client but when viewed by another player it appears broken:
My Client:
Their Client:
Code changing IDs:
local function replaceAnimations(folder)
for _, anim in folder:GetChildren() do
local charAnim = CharAnimations:FindFirstChild(anim.Name)
if charAnim then
charAnim.AnimationId = anim.AnimationId
end
end
end
if sheathe == true then
replaceAnimations(Defaults)
else
replaceAnimations(Greatsword)
end
Code applying Animations when ID changes:
local animChange = anim:GetPropertyChangedSignal("AnimationId"):Connect(function()
animTracks[anim.Name] = animator:LoadAnimation(anim)
animChanged:Fire()
for _, playingAnim in hum:GetPlayingAnimationTracks() do
if playingAnim.Name == "Sheathe" then
playingAnim:Stop(.5)
end
if playingAnim.Name == anim.Name then
playingAnim:Stop()
animTracks[anim.Name]:Play()
end
end
end)