FenixFrog
(FenixFrog)
#1
So I am trying to make multiple parts change to a different color but it didn’t work and here is the script and there are no errors.
local checkpointchildren = workspace.Checkpoints:GetChildren()
script.Parent.MouseButton1Click:connect(function()
checkpointchildren.Color = Color3.fromRGB(83, 167, 83)
end)
NyrionDev
(Nyrion)
#2
checkpointchildren is an array containing all the checkpoints. You are supposed to change the color of each one using a loop.
for i, checkpoint in pairs(checkpointchildren) do
checkpoint.Color = Color3.fromRGB(83, 167, 83)
end
I suggest you check Introduction to Scripting | Roblox Creator Documentation and Tables | Roblox Creator Documentation
1 Like
You need to iterate through every basepart. Right now you are trying to cast a color propery on an array, which does not have the color property.