Why can't PivotTo be used to teleport model?

You can write your topic however you want, but you need to answer these questions:

  1. So, I have this monster model in ServerStorage and I want to copy it and move it to the workspace spawn area.

  2. It gave me errors like PivotTo is not a valid member of CFrame and Vector3
    image

  3. I tried looking for solutions on the hub, but to no avail, I still don’t understand why PivotTo can’t be used on CFrames even though it is related to CFrames.

local monsterChosen = "Monster"
local monster = game.ServerStorage:FindFirstChild(monsterChosen):Clone().PrimaryPart.CFrame
local map = game.Workspace.Map:FindFirstChild("Forest")
local monsterSpawn = map:FindFirstChild("MonsterSpawn"):GetPivot()
monster:PivotTo(monsterSpawn * CFrame.new(0,1,0)) 
print("Monster spawned")

Try removing .PrimaryPart.CFrame, pivot to should work with the model instance.

Oh wow, thx @dthecoolest . The error has gotten away but the problem now is that the monster still hasn’t loaded. The spawn is still empty. Hmm, should I create a new topic? Or ask it here.

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