I have been working on custom animation for my morph. Animation should work when there’s no tools equiped, whenever tool is being equiped animation must stop. Currently everything works perfect and amazing on client side, but not on server side. Server side animation can be glitched sometimes. I’d appreciate any help and solutions.
Current animation parameters:
Priority: Action
Loop: true
Animation is playing on animator. So far I tried: Disabling Motor whenever tool is equiped/unequiped. Changing animation priority. Using two separate animations one being paused and one being looped (currently looped, but they have same behavior). Disabling RequiresHandle on tool. Changing humanoid state type on equip/unequip. Checking if morph is invalid or broken.
hi, problem is that you don’t set animation priority, set it Enum.AnimationPriority.Idle for idle animation and Enum.AnimationPriority.Action1 on the tool that will be in your hand.
-- example
local anim = Instance.new("Animation")
local hum = game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid", 2)
local track = hum:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action1 -- this
track.Looped = true
track:Play()
maybe i didn’t understand it initially, try replicating the animation for all clients.
upd:
hi, I’ve tried your solution, checked priorities and this glitch is still exists. While also trying this, I’ve tried checking animations with server and clients to find out this glitch appears with other animations:
pretty sure this is a Motor6D thing, not the animation. quick question - is Track:Play() getting called on the server too, not just client? if so that’d explain it, the client playing it is enough since Roblox replicates that to everyone automatically, calling it on the server too just makes both sides fight over the same joint
also check where the Motor6D gets created, has to be server side before the animation runs or it won’t replicate right
last thing, if any script’s touching C0/C1 on that Motor6D or the tool grip cframe on RenderStepped/Heartbeat, that’ll override the animation every frame. worth checking
I’m using remote event that’s firing client and local script that’s in the morph on equip/unequip. Also I’ve created motor using moon animator so it’s server sided. And lastly nothing affecting the motor.. While checking your solution I did turn off my animations to see what’s going on, everything goes well, so it’s related to animations, I’ll try to recreate animations using moon animator…
Before recreating them, try changing the animation priority to Action2 or Action3. Roblox’s default tool animation is probably blending with yours on the server.
Alright guys, after some invistigation I’ve finally fixed this glitch. As I expected it was glitched because of my preloader system (system would preload character’s & whitelisted anims for future use by anim’s names, this caused animator to have duped animation tracks, and this is what caused the issues).. My system was preloading default roblox’s anims, so I’ve decided to add blacklist to that animations and it actually worked! Thanks everyone for helping me!