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

Can someone help me with this?

So, I have this script that can change the color of my model. The thing I do not like is that it changes the color of my entire model, and I do not want that. I am confused because the "Children" of the model "Item" inside the model "Model" are named Parts, and that is their class name as well. I do not understand where "BasePart" is coming from, if the model does not have anything named "BasePart." Can someone help me?

if Model:FindFirstChild("CurrentColor") ~= nil then
				local CurrentColor = Model.CurrentColor.Value
				print("Found color")
				for i,v in pairs(Model.Item:GetChildren()) do
					if v:IsA("BasePart") and v.BrickColor.Name == CurrentColor.Name then
						v.BrickColor = BrickColor.new(Color)
						
					end

1 answer

BasePart is another class name of Part. Also, what are some bricks that you want the color to change into?

1 comment

0

Is there a way I can change the name of some of the bricks to Color, to make just those specific bricks change color?

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