Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I teleport a whole model to a certain position?

Asked by 4 years ago

I remember being able to do this, although I forgot. How do I teleport a model to another position?

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You can use :SetPrimaryPartCFrame(), you can easily make a CFrame from the other position using CFrame.new(newPosition)

Note: While SetPrimaryPartCFrame does it's job, after a while you can notice parts not being at the right offset anymore (However this does take a while). If you want to ignore this fact you can designate 1 part (for example the PrimaryPart) to be moved using it's own CFrame or position and welding all the parts in the model to the PrimaryPart. That can potentially solve the issues.

0
Still having issues. Aeroporia 37 — 4y
0
Still having some issues. Its not going to the new spot when its put into the workspace. It stays in the same spot it was in Server Storage. Aeroporia 37 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

This is my script:


wait(7) local copy = game.ServerStorage.Nuke:Clone() copy.Parent = game.Workspace copy:SetPrimaryPartCFrame(script.Parent.Position)

Answer this question