Hello, I am requesting help on the matter of the Motor6D movement for my NPCs not replicating to clients. Currently, I have it set up so that the waist and neck motors are being transformed. Here is it's intended function that works in studio:
http://gyazo.com/16ea880a2d0d3085c0cd1fe5e29fd8de
The code that handles the Motor rotation is in a server script inside of the NPC. I am updating it with RunService.Stepped(). Here is the relevant part of the code:
local RunService = game:GetService("RunService") RunService.Stepped:Connect(function() Waist.Transform = limitAngles(TargetCFrame, 20, 20) head.Neck.Transform = limitAngles(TargetCFrame, 60, 60) end)
limitAngles is a simple function to clamp the rotation angles.
All of this works fine in a regular, solo play studio. However, when I test it in game or on a local server, this movement does not replicate to the clients, but is visible to the server.
I read the wiki on Motor6D Transform, and it states that: "For performance reasons this property won’t fire the Changed signal and doesn’t replicate." Does this explain the problem I am experiencing? Can you point me in the direction of a workaround? Thanks.