Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Motor6D Transform not replicating?

Asked by 5 years ago
Edited 5 years ago

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.

0
You have filteringenabled set to true. You can disable it in the workspace properties. Troxure 87 — 5y
0
Well, I'd like it to be compatible with filteringenabled, seeing as the security benefits it provides and roblox's recent crackdown on it's lack of usage. iColorDev -2 — 5y
0
Roblox removed none-FE, If you turn the FE option off the site just says "this game may be broken" Thegrimdeathzombie 40 — 5y

Answer this question