How can I teleport/move a model to a certain part?
I would use :SetPrimaryPartCFrame(), but I’m not sure that’s totally reliable. Make sure the model has a PrimaryPart while using this, since it moves the PrimaryPart and moves the rest of the model with it.
gtg btw
my models won’t have primary parts though.
You have your model, lets say in this example it looks like this:
First things first, we need a part that is perfectly centered in the model. The way I like to do this is setting the part’s size to Model:GetExtentsSize()
and then making sure everything fits inside of the primary part perfectly, you should see some overlapping of the colors like this:
Make sure you set the model’s PrimaryPart as the part you just made:
Now let’s say I want to move my model from Point A (the model’s position) to Point B (the blue part’s position). How would I accomplish that?
It’s really as simple as using Model:SetPrimaryPartCFrame()
, and identifying the CFrame of the brick.
workspace.Model:SetPrimaryPartCFrame(workspace.TeleportAnchor.CFrame)
When finished, it should look like this: