When I do PivotTo Or MoveTo on my npc it won’t move for some reason please help
all the parts of the npc are unanchored exept for the humanoid and when you bumb into the npc it also won’t move:
local enemies = game.ReplicatedStorage.Enemies
local enmiesWorkspace = workspace.Enemies
local wayPoints = workspace.WayPoints
local function spawnEnemy()
local newEnemy = enemies.OrangeEnemy:Clone()
newEnemy:PivotTo(wayPoints.StartPoint.CFrame)
newEnemy.Parent = enmiesWorkspace
for count = 1,3,1 do
print(count)
for i,v in pairs(wayPoints:GetChildren()) do
if v.Name == tostring(count) then
print("E")
newEnemy.Humanoid:MoveTo(v.Position)
print("Z")
newEnemy.Humanoid.MoveToFinished:Wait()
print("R") -- R doesn't print
end
end
end
end
while true do
task.wait(3)
spawnEnemy()
task.wait(15) -- only for testing
end