I am trying to turn an NPC with BodyGyro to face a part. Every time I run the game, the NPC stays in place, without turning towards the desired part.
As you can see there is a range part welded to the humanoidrootpart, but that was intentionally put there. It does not seem to be causing the problem as the issue still persists even when I delete the range part.
Here is the script:
local npc = script.Parent
local humanoidrootpart = npc.HumanoidRootPart
local bodygyro = humanoidrootpart.BodyGyro
local goalbottom = workspace.Goalbottom
while true do
bodygyro.CFrame = CFrame.new(humanoidrootpart.Position,goalbottom.Position)
end
I apologize for the late reply. The reason why it’s not working is that you have yet to set the NPC’s network owner to nil. Here’s a snippet for you to use.
for _, v in pairs(npc:GetDescendants()) do
if v:IsA("BasePart") then
v:SetNetworkOwner(nil)
end
end