Need help moving a Model to a new position[SOLVED]

Hello, I am trying to move a model, to the location of a different model, is this possible? If so, how would I do it?

	local Booth = game.Workspace.Map.Booths:WaitForChild(Player.UserId)
		local NewBooth = game.ReplicatedStorage.Booths.D:Clone()
		NewBooth.Parent = game.Workspace.Map.Booths
		NewBooth.Name = Player.UserId

I need to move NewBooth to Booths position on the map.

The Booth has multiple parts inside of the model, I don’t know if that would make it be a different script to move it.

First, set the PrimaryPart of the model to any part you find ‘worthy.’

Then, use model:SetPrimaryPartCFrame(cframe) which will move the entire model.

For the CFrame value, should i do Booth.PrimaryPartCFrame?

Yes. It may need some adjustment, but that is the gist of it.

When i do this, all it says is that PrimaryPartCFrame is not a valid member of the Booth

Try PrimaryPart.CFrame instead. My apologies.

1 Like

In the output i got attempt to index nil with ‘CFrame’

You need to set the PrimaryPart of the model to something, as it was not set to anything. You can do this via the properties menu.

1 Like

I did, i set it to a part called Primary, it covers the whole model

Ah. When you clone a model, the PrimaryPart does not carry over. In your script, set the model.PrimaryPart to model.Primary

1 Like

It works! I found my problem, I forgot to Anchor the parts

Thank you for all of your help!

No worries, glad you were able to figure it out. Make sure to mark the post as solved, you can mark your own replies.

1 Like