The problem with teleporting a mob

Okay, I have a script that should teleport the monster to the advanced point, but for some reason, it appears in a different place. Here are screenshots of the script, and if necessary, I will send you the monster file. I hope for a reply)

Снимок экрана 2023-01-24 в 22.10.41



On line 27, when you teleport the mob, you are only changing the CFrame of the HumanoidRootPart instead of moving the whole model. In order to move the whole model, you can use :PivotTo().

local newMob = mobExists:Clone()
newMob.Parent = workspace.Mobs

newMob:PivotTo(map.Path.Start.CFrame)

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