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

How to do getchildren cframe for all models?

I'm attempting to make light beams but for some reason the CFrame only moves one model. Heres the code:

local model = script.Parent.Parent.Parent.Parent.Rigs:getChildren() 
while true do
	for c = 1, #model do
for i = 0,400 do
	model[c]:SetPrimaryPartCFrame(model[c]:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ(0,1,0)) 
	wait()
end
end
end

1 answer

On line 3, it only gets one model. Therefore, it only moves one.

2 comments

0

I'm not sure if I'm correct, though.

0

I'm not understanding why its only taking one

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