The Goal
I’ve been trying to create a System where after being attacked, Players are hit down to the ground in a crawling state. In order to achieve this, I create an Animation of the Player crawling along the Ground. The Intention is that after the Player is hit with a weapon, an Animation of the Player tripping over is played, and then the default Walk, Run and Idle Animations in the characters Animate script are overriden with the crawling animation that I made. This Animation is looped with Action Priority.
TL;DR The Player should fall to the ground when hit with the Weapon, and appear as if they are crawling when they move, until they have waited long enough to recover and stand back up again. Simple!
The Problem
However, of course it’s never truly that simple. Only the Player who is hit down witnesses the Animation as they should. They Player trips over, and the default Walk, Run and Idle Animations are overwritten with the crawling animation that I made.
Meanwhile, everyone else witnesses a strange phenomena, where the Character is instead slightly tilting forward. The previously mentioned Trip Over animation plays, but then once the default animations are overwritten, the Player becomes stuck in the strange “tilting” pose.
How it should appear, and how it appears for the Local Player:
How it appears for everyone else on the Server:
What I’ve Tried
At first, I thought it was an issue with Replication. I know that Animation Replication is sometimes confusing, however, I changed these Values from a Server Script. Nonetheless, I did try firing a Remote Event to each Client to try update the Animation Values from the Client and see if that made a difference. Ultimately, whether or not it was on the Server or Client, the Values for the AnimationIds did change, but the result remained the same.
Eventually, I noticed (as you can see in the Screenshot), that the HumanoidRootPart of the Character appeared to almost be Blocking the Character from falling to the ground. I noticed that in the Server Simulation, if I deleted or moved the Humanoid Root Part, the Character will briefly fall to the ground, which indicated to me that there seemed to be an issue with the Character colliding with itself. This confused me, as I have previously made a CollisionGroup called “Players”, and all the Parts in the Character are set on the Character being added to this CollisionGroup, to prevent Player Characters colliding with each other. I would’ve thought that would mean the Humanoid Root Part would not be able to collide with other parts of the Character?
So, I then tried making a new Collision Group called “Tripped”, and changing the HumanoidRootPart to that, whilst keeping the other parts of the Character in the “Players” collision group. This also, did not yield any success.
I tried creating new animations, to see if maybe something went wrong with my Animating! I tried re-positioning the Humanoid higher up, so it was slightly more off ground level, and less likely to collide with the floor. This also didn’t change anything. I even also tried creating an animation where the Player literally just rotated 90 degrees to lie flat. Also, no results.
Honestly, I feel like I have pretty much tried everything! What confuses me the most about this, is that I have another animation in the game where the Player lies in a bed whilst restoring their energy, this plays an Animation where they are lying on their back, and that never had this problem.
Maybe I’m just being silly, but I’m almost totally convinced that this is some really strange Physics bug. If anyone has any thoughts, please help me out!!