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