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

why doesnt my "change color of models children" script work?

so im making a part in my obby where you have to walk on a specific path that changes its color every while. i dont properly know whats wrong.

local e = false
repeat
local children = script.Parent:GetChildren()
children.Color = Color3.new(255, 0, 0)
wait(2.5)
children.Color = Color3.new(55, 0, 0)
wait(5)
until e == true

please help

2 comments

0

any errors?

0

nope

1 answer


local children = script.Parent:GetChildren()
for i,c in pairs(children) do
c.Color = Color3.new(255, 0, 0)
wait(2.5)
c.Color = Color3.new(55, 0, 0)
wait(5)
end

A for loop should do just fine!

1 comment

0

it doesnt seem to work, it just colors each part 1 by 1

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