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

How do i color the parts from multiple models?

Im trying to color all the parts from multiple models. like there is a model called: "Model" and the other one "Model2" and i want both the parts to color at the same time. If someone could help, thank you!

2 comments

0

The parts in the model?

0

the parts in multiple models

1 answer

✓ Accepted answer

I'm not sure what you're asking in particular, but from what I read you could maybe try something like this?

  1. Ungroup both models
  2. Put everything from both into one model
  3. Insert the script below into the model.
  4. Rename everything you want to change at the same time to what's in the script below, such as "Part"
  5. Add a function based on what you want to do, I already added one as an example which is when a clickdetector gets clicked. Make sure if you use this function to add a clickdetector into your model
  6. Do something with the colors as you intended.
function onClick()
for index, descendant in pairs(descendants) do
	if descendant:IsA("Part") then --Change "Part"
		descendant.BrickColor = BrickColor.Green()
	end
end

script.Parent.ClickDetector.MouseClick:Connect(onClick)

1 comment

0

Thats not what i meant, and i didnt try the script because i know what it means but i know it works! Thanks for helping anyways?

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