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

How to move a model's children, smoothly?

Here is the output and the script I made.

Output : 14:36:02.502 - Workspace.Model.Lever.Script:5: attempt to index field 'Position' (a nil value) 14:36:02.504 - Stack Begin 14:36:02.505 - Script 'Workspace.Model.Lever.Script', Line 5 14:36:02.506 - Stack End

local BS = script.Parent.Parent:GetChildren() 

function Move() 
	wait(2) 
	BS.Position.CFrame = BS.Position.CFrame*CFrame.new(0,1,0)
end 

script.Parent.ClickDetector.MouseClick:connect(Move)

1 answer

local Model = game.Workspace.Model

function Move()
	for Index,Part in pairs(Model:GetChildren()) do
		if Part:IsA("BasePart") then
			Part.CFrame = Part.CFrame + Vector3.new(0,1,0)
		end
	end
end

I believe this would work.

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