Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to clone models, then move them?

So im working on an tycoon that should/will allow you to pick a couple different tycoons you want to build. the only way i could think of doing this was to create all the tycoons and then when the user picks one it clones the already built tycoon to his "plot" for him to build, my only problem is, once i clone the model i dont know how to move all the pieces to his "plot" since the model doesnt have a position value

is there a way to easily move a model?

1 comment

0

idk if you can CFrame models

2 answers

Try using the MoveTo function of Model. Set the baseplate (or something at the center of the tycoon) as the PrimaryPart of the model. Then use the MoveTo function.

If this answer helped you, please upvote and accept it. If not, let me know what's wrong in a comment. Thank you!

You can do this by using MoveTo, but the model must have a primary part. The primary part will go in that position, the other baseparts will offset. If the model is in large size, I recommend the PrimaryPart in whatever is the very center of the model, for better accuracy.

--MUST HAVE A PRIMARYPART
local model = --The model you're cloning

local cmodel = model:Clone() --Clones the model.
cmodel.Parent = workspace --Sets the model's parent to workspace.
model:MoveTo(Vector3.new(0,0,0)) --Set the position here.

This discussion is preserved as it was. New answers, comments, and votes are closed.