Hi, so I’ve been running animations on my guns on the client, but whenever I switch weapons, they cannot see my arms anymore and they disappear, but I still see the animation. When they switch weapons, I have to delete a part that I use for the guns which follows the neck weld. For some reason it gets rotated 90 degrees for no reason at all when switching guns, so this is why I delete it. Now whenever I load in the secondary weapon, the arms disappear for other players but you can see it yourself. The gun is still being animated though.
I thought the issue was maybe a replication issue from roblox, so I added in a local script for the other clients that loads in the animation for the other player as well, but this isn’t working either. Here’s a picture of what’s occurring (we are both using the same gun, although my arms are showing but his aren’t, he sees the opposite)
The animation priority was originally set as a movement (I removed idle animation, and the arms are rigged differently from the default arms), so I switched to to action and this did nothing as well. I’m not sure what’s going on. Here’s my code for loading the animations, but I don’t think it would help much:
local IdleAnim = Instance.new("Animation")
IdleAnim.Name = "IdleAnim"
IdleAnim.AnimationId = idleId
IdleAnimTrack = animator:LoadAnimation(IdleAnim) -- animator is character's animator
IdleAnimTrack:Play(0.100000001,1,0.75)
So I haven’t quite learned this field of development in roblox studio, but from what I’m guessing, you need a way to update the server that the player is committing an animation, so maybe use a remote function or event for this. Strange though, since the server is always updating player position and orientation, so an animation should be rendering.
I did this as well to try and combat the issue, and it had no effect on it. The client even loads in the animation for the other player and plays it, yet it does nothing.
Then it could be that the animation hasn’t been saved correctly. Now that I think of it, maybe play test as the server, and make sure the animation is playing while you’re play testing as the server. That would give a clue if your animation is being rendered
Also an idling animation kinda shouldn’t move lol.
Okay, so I did it in a test server and it worked perfectly fine. There were no issues, I ran it with a local server and the server showed both of their animations. I then went to test in a real server and it was still broken.
Are there any errors in your script? Did you commit the script? I get that a local script is needed to play an animation on a humanoid, but what happens if you put the animation in a server script, and try using a remote functions from the player.
No errors, I committed the script, I just tried creating the animations on the server and having the client load them and this still caused the same issue. I’m thinking maybe it may be an engine bug?
What ttthhheeeeeee. , what about the animation itself, you say that you can see it right? What if you copy the asset id of the animation instead. That what I’ve read when trying to learn animation.
I’m unsure what you mean by this, isn’t the asset ID the same as the ID I’m currently using the load the animation? Yes, the client that loads it can see the animation. I don’t think there are any parts on the other clients that would change anything to do with the other player either.
What I mean by asset ID is the string of numbers for such animation, for example, an image can be named “Sus Image” but its asset id is rbxassetid://56736712 (for example)
Might be trivial, but is the Animator a descendant of a Humanoid or AnimationController in a players character? If it is, then animations started on the player will be automatically replicated to other clients. If not, the animations have to be loaded and started on the server to replicate. Could you maybe give us more information as to what kind of animations it is, and what exactly you’re animating?