Weird behavior with replicating Motor6D animations

Over the past month or so, I’ve been on and off working on a simple firearms system for a new project of mine. Only recently did I observe it from the server, and I ran into super weird behaviour.

You’ll notice the MP7 that my alternate account is equipping gets stuck in the the torso. This shouldn’t be happening. The output isn’t throwing out errors, and the code has been nearly perfected. A simple run down is, every time a player equips the MP7, a script looks for the RightHand Weld that is created by default, destroys it, and replaces it with a Motor6D in the torso. What makes me further believe this isn’t an issue with the script and a bug with ROBLOX itself is that the Motor6D “switches on” as the alternate account nears my player, and begins performing as expected.

I’ve done some scouring around the forums already, and I’ve seen multiple posts about this issue, with one dating back to May of this year, and none of them have been solved. So I’m left helpless, hoping on the off-chance that maybe this thread could get some help thrown toward it. Not sure how a lot more people haven’t run into this bug.

Here’s the Motor6D script. GripToMotor6D.lua (1.3 KB)

I’d be happy to provide any more information if needed. Super tired, and very demotivated at the sight of something so out of my control.

Edit: I just tested for this bug on an older version of a weapon system I made, and despite it working fine a few months ago, lone and behold the bug has made its way into this system too. It uses the same Motor6D script, so I’m not ruling out the possibility that it’s crippled due to a ROBLOX update or whatever else. I’ll do some testing with different methods, and see if I still get the same problem.

1 Like

A workaround I use for this bug is to send to all the other clients the player that equipped the gun and have the other clients disable and enable the motor6d inside the player that equipped the gun.

So something like this

Server script:

Equip.OnServerEvent:connect(function(player, args)
Equip:FireAllClients(player)
end)

Local Script:

local LocalPlayer = game.Players.LocalPlayer
Equip.OnClientEvent:connect(function(player)
if LocalPlayer ~= player then --check if the player sent is not the client
player.Character.Torso.Motor6d.Enabled = false
player.Character.Torso.Motor6d.Enabled = true
end
end)

3 Likes

Works for me with a wait() in between disabling and enabling. Appreciate it a bunch, man. I’ll use this until ROBLOX can finally get around to fixing whatever’s going on.

1 Like