Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SetModelCFrame(model, cf, modelCF)
- local modelCF = modelCF or (model.PrimaryPart and model.PrimaryPart.CFrame or model:GetModelCFrame());
- local function recurse(o)
- for _, child in ipairs(o:GetChildren()) do
- recurse(child);
- end
- if o:IsA 'BasePart' then
- o.CFrame = cf:toWorldSpace(modelCF:toObjectSpace(o.CFrame));
- end
- end
- recurse(model);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement