How would i teleport a whole model with parts inside instead of just putting a script into each part?

I have a model that has many parts and i dont want to put each script inside each part, is there another way where i can teleport a whole model? I also dont want to use union

local Pos = math.random(1,3)

if Pos == 1 then

script.Parent.Position = Vector3.new(-530.79, -13.56, 54.07) 
end
if Pos == 2 then 
script.Parent.Orientation = Vector3.new(0, 0, 180)
script.Parent.Position = Vector3.new(-475.531, 5.62, -16.03) 
end
if Pos == 3 then

script.Parent.Position = Vector3.new(-495.61, 25.84, 38.05) 
end
1 Like

You would just use SetPrimaryPartCFrame which will move all of the parts associated with the model.

local cfList = {
   CFrame.new() * CFrame.Angles(), ...
}

model:SetPrimaryPartCFrame(cfList[math.random(1,#cfList)])
4 Likes