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

May someone please write this script?

I want a brick (spawned in the script) that changes colors and shapes all by random. Can someone please write this? I will +1 you :)

2 answers

✓ Accepted answer

Do it ;)

function getAllChildren(place,table_) 
		for i,v in pairs(place:GetChildren()) do 
			table_[#table_ + 1] = v 
			getAllChildren(v, table_) 
		end 
	end 

	local children = {} 
	getAllChildren(game.Workspace, children) 
while true do
for i = 1,#children do
children[i].BrickColor.Number = math.random(1,1032)
wait() -- no lagging
end
wait() -- no lagging
end

9 comments

0

yes!!

0

Works? :)

0

Sadly no...line 12 error. If you could fix that that would be great!!

0

ok

0

Could u fix it? :)

0

function getAllChildren(place,table_) for i,v in pairs(place:GetChildren()) do table_[#table_ + 1] = v getAllChildren(v, table_) end end local children = {} getAllChildren(game.Workspace, children) while true do for i = 1,#children do if children[i].ClassName == "CornerWedgePart" or children[i].ClassName == "FlagStand" or children[i].Cl

0

shapes r the same

0

Please, vote for +1 on my reputation ;)

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