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

How can I move the children of this model at the same time without having to do individual code?

function onTouch() Cage = game.Workspace.Cage:GetChildren() for x = 0, 15 do wait(.05) Cage.CFrame = Cage.CFrame + Vector3.new(0,0,.63) end end script.Parent.Touched:connect(onTouch) I'm trying to get all the children to move with eachother.

1 comment

0

please try to format your questions

1 answer

You can use :SetPrimaryPartCFrame() a function of models, which can be used when a model has a primary part set. Use it like it

local model = workspace

model:SetPrimaryPartCFrame(CFrame.new(0,0,0))

The function takes a CFrame argument and moves the entire model relative to the primary part

2 comments

0

Ty!

0

@EmptyScythe accept answer ;p

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