CurrentAngle for Animations are not replicating to the Server or Other Clients

For context, I am using Motor6Ds for animations, and I create these Motor6Ds with a server script that goes along the lines of this:

local EquipMotor         = Instance.new("Motor6D")
EquipMotor.Parent 	     = character[item.AttachPoint]
EquipMotor.Name          = "Motor6D"
EquipMotor.Part0  	     = character[item.AttachPoint]
EquipMotor.Part1  	     = item.handle

The animations I use are created in the Moon Animator and are loaded in through animation tracks.

Recently I realized that all my animations that dealt with tools were not replicating properly. All of these animations are being played locally on an Animator created by the server. From the client that ran the animation, the animation plays just fine, but from other clients, the animation is replicating incorrectly. It seems like the CurrentAngle property for the Motor6Ds isn’t replicating to other clients or the server.

Client’s perspective:
image
Client’s Motor6D properties:
image
Server’s perspective:
image
Server’s Motor6D properties:
image

The weirdest part is if I input any number > 0 for the CurrentAngle on the server, it seems to fix itself and apply the correct CurrentAngle.

After typing 1 into CurrentAngle for Server’s Motor6D
image

Server’s perspective after typing 1 into CurrentAngle
image

If I can recall correctly, my animations were replicating correctly before for all clients a couple of months ago, so I am not sure if this is a bug on Roblox’s side or my side. Is there a way to fix this issue?

EDIT: If I push my character from the server a little, it seems to fix itself and replicate the Motor6D properly. This is really weird.

1 Like

You could always use Remote Events to force replication by sending the CurrentAngle and instance and then telling the server to update the property.

I too have this problem and it has been bugging me from yesterday,
I was following Egomoose fps tutorial which is this: https://devforum.roblox.com/t/the-first-person-element-of-a-first-person-shooter/

And I keep getting Problems exactly what you describe on the Motor6D

Here is my code that set’s up the Motor6D

Server:

remoteEvents.setup.OnServerEvent:Connect(function(player, weapon)
	local weapon = weapon:Clone();
	local joint = Instance.new("Motor6D")
	joint.MaxVelocity = 0.1
	joint.Part0 = player.Character["Right Arm"];
	joint.Part1 = weapon.Handle;
	joint.Parent = player.Character;
	weapon.Parent = player.Character;
end)

Client (Which is located in StarterPlayerScripts):

remoteEvents.setup:FireServer(repWeapon);
--This is not on a loop or anything

Here is Screenshots of it (Sorry for bad quality)

Client
error1

Server
asduas

The current angle changing when updated from server is happening to me too
Here is a Video Proof (Sorry for bad quality)

https://gyazo.com/ca6ae92e1b6952e4cad21648a2daf6da

So this may be Roblox engine bug?, I’m not so sure

This is more than likely a FilteringEnabled bug. ‘Everything that happens on the client, stays on the client.’ RemoteEvents are probably the only fix to this.

I did use remote event, It was fired from client to a server to set up the Motor6D

But you should use a remote to change the CurrentAngle on the server since the client-server boundary is the reason why it won’t replicate.

So you mean I just use a script to change the current angle and it will update to an angle I wanted?

Correct, this is because this issue is a filtering enabled problem.

Soo, I’m back after scripting it, and it did not work.

Using script:

Manually change it to random number from Server and it did this

Im very confused

From going through the forums, this issue is either a bug, some type of unexpected behaviour, or a change in behaviour for Motor6Ds.
This post with a similar problem solves this issue in a hacky way: [R6] Tool hold animation not replicating to all clients - #9 by theswolebaby

For my issue, It only appears to fix itself on the second equip, so right now the only way to fix this issue is to run the equip function, wait a few seconds, then unequip and equip again. It looks really weird in-game when you do this and it makes your code really hacky, but I guess this is the only way to fix this bug or whatever it is. Apparently, from the other posts, this bug was fixed already by staff or something, but it does not seem like the case at all as there are a few posts dealing with this issue.

What was the script that you used.

This


remoteEvents.setup.OnServerEvent:Connect(function(player, weapon)
	local weapon = weapon:Clone();
	local joint = Instance.new("Motor6D")
	joint.MaxVelocity = 0.1
	joint.Enabled = true
	joint.Part0 = player.Character["Right Arm"];
	joint.Part1 = weapon.Handle;
	joint.Parent = player.Character;
	weapon.Parent = player.Character;
	
	wait(1)
	joint.CurrentAngle = 0.342
end)

I’m not sure if I did something wrong here

Could it got anything to do with DesiredAngle.

What do you mean by that?, Do you mean Use the Desired Angle instead of Current angle?
Because if so, I tried that and still got the same result

No, I meant was desired angle overriding it but no, but interestingly enough guess what the only [notreplicated] property in a motor6d is, its CurrentAngle.

This means every individual client will need the CurrentAngle sent via RemoteEvents to them.

So you mean fire an event of a motor6D Current angle from the client perspective to a server, then basically copy and pasting the Current angle to the server perspective of the Motor6D?

No, when the server gets it then send it back out to the rest of the clients since the property is not replicated.

1 Like

Oh so you mean rather than making the server see it correctly, we make the other players see it correctly?

1 Like

Yes, this would be a step in the right direction.

1 Like