Teleport a npc doesnt work

I want to make so an npc can get teleported and ive looked at other posts but they have some wierd solution and i want one with coding heres my current code:

								local ok = game.ReplicatedStorage.Entities:FindFirstChild(mobType)
								print("H")
								if ok then
									local clone = ok:Clone()
									print("c")
									clone.Parent = workspace.Entities.InGame
									local random = math.random(1,5)
									local part = workspace.mapFolder:FindFirstChild(mapName):FindFirstChild("MobSpawn"..random)
									clone.Parent = workspace.Entities.InGame
									clone.HumanoidRootPart.Position = part.Position
								else
									print("Entity doesnt exist)
								end
							end

ive tried doing cframe and Humanoid:MoveTo() and other things :confused:

3 Likes

Have you tried using Model:PivotTo(Cframe) on the NPC’s character model?

local cframe = CFrame.new(part.position)
clone:PivotTo(cframe)

That should work.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.