Model bc = bluecar Model ebc = editbluecar
ebc:MoveTo(bc:GetModelCFrame()) doesn't work as MoveTo uses Vector3.. But I also want the model to be rotated. Yet I am taking into account the cframe of a model is the center, it's the same size (a replica) just with an addition.
TY!
To move model1 to model2
01 | model 1 = Model |
02 | model 2 = Model |
03 |
04 | local a = model 1 :GetModelCFrame() |
05 | local b = model 2 :GetModelCFrame() |
06 | local c = a*b:inverse() |
07 | function getparts(m) |
08 | for _,v in pairs (m:GetChildren()) do |
09 | if v:IsA( "BasePart" ) then |
10 | v:BreakJoints() |
11 | v.CFrame = c*v.CFrame |
12 | v:MakeJoints() |
13 | end |
14 | getparts(v) |
15 | end |
16 | end |
17 | getparts(model 1 ) |