The animation graph for my client-sided enemies works in studio but not in game, and I’m unable to determine why this happens. The setup used to work around 2-3 weeks ago. I’m not exactly sure which studio update caused it to error out since I figured the issue would’ve been resolved sooner.
Here’s what happens in Studio gameplay. This is expected behavior:
Here’s what happens in-game. The core animations (idle, walking, running, sprinting) and barrier tearing animations don’t play, but the attack animations and enemy flinch animations do play. All the animations are in one animation graph too; its as if the animation graph doesn’t play by default for some reason.
A repo place file is provided in the staff section.
A couple of questions to help narrow down the issue:
Is your experience using server authority?
I see in the second video that there is an “Animation failed to load” error in the client logs. Is that animation part of the animation graph (particularly one of the animations that is not playing)?
No, we’re not using server authority at the moment.
I noticed that error log as well; I traced it back to the template rig I placed in the placefile, since it was trying to use an Animate script of an older animation graph. The animation graph id in the error from the video is a different animation graph to the one I’m having issues with.
I rerecorded the in-game footage to show the issue still persists after addressing the error. I also added a looping print statement and a line of code to force one of the animation graph’s parameters to force the sprinting animation, but animation graph fails to reflect that.
@Kyles45678 Upon inspecting the GraphAnimate script that you have, I see this:
local coreTrack : AnimationTrack|MockGraph.Graph = nil
if USE_MOCK or not RunService:IsStudio() then
coreTrack = ZombieGraph.new(animator, coreAnimation)
else
coreTrack = animator:LoadAnimation(coreAnimation)
end
Is it possible that in studio, you’re loading a different graph vs. in live client? And is it possible that the graph loaded in live client is outdated?
Looking at ZombieGraph (at game.ReplicatedStorage.Game.ClientEnemies.EnemyScripts.ZombiesTestV2.Animate.GraphAnimate.MockGraph.ZombieGraph), I see parameters being referenced like IsSprinting and CoreAnim which are not set in the GraphAnimate script.
This was it! I totally forgot I had that there! I was using that to test animations in-game while the graph was in beta, and the mock module’s code was outdated since I changed the animation graph.
So sorry for wasting your time! I really appreciate the help and I appreciate you taking the time out of your day to track this down. Thank you so much!