I simply run this on the npc. script.Parent.Humanoid:Move(Vector3.new(1,0,0),false) Which is fairly simple and works fine in play test, the npc moves in the specified direction.
But when in server mode, If a player is close to it (About 10 studs i'd say) It just stops moving. And resumes it's movement once the player is away.
I tried in different places, it works fine. So it is only in that specific place i am working on. In said place, i tried disabling all code, except the npc's, And it still does it.
Does anyone have any idea why? Thanks!
Also here's a gyazo of what it looks like.
https://i.gyazo.com/5a57b3c36ed5e7c02048b6e8b07c5a7e.mp4
Do this: for i = 0,100,1 Humanoid:TranselateBy(Vector3.new(i,0,0)) wait() end
change the 3 numbers after i = to what ever you'd like.
This is due to the Roblox engine having automatic NetworkOwnership set to auto. NetworkOwnership is where the physics of the BaseParts are being handled. If you are using Humanoid:Move() on client you'd have to set the NetworkOwnership to the player on a server-sided script and disable SetNetworkOwnershipAuto like:
--server-side game.ReplicatedStorage.SetOwner.OnServerEvent:Connect(function(plr) for i,v in pairs(workspace.HumanoidNPC:GetChildren()) do v:SetNetworkOwnershipAuto(false) v:SetNetworkOwner(plr) end end)
and on the client you'd just have to fire the RemoteEvent you put somewhere.
If you are doing this via server-side you'd just have to disable auto ownership like such:
for i,v in pairs(workspace.HumanoidNPC:GetChildren()) do v:SetNetworkOwnershipAuto(false) end