I have constructed a script that lets you change the color of a part on your model, but when I click it, it only colors one part. What I am aiming for is to click this button and for all parts named "Wing1" to be colored.
local wings1 = game:GetService("ReplicatedStorage").Recolor.Wings1:WaitForChild("a")
wings1.OnServerEvent:Connect(function(player,part)
local model = player.Character:FindFirstChildOfClass("Model")
model.Wings.Wing1.Color = Color3.fromRGB(255, 255, 255)
end)
There are several separate parts named "Wing1" underneath the "Wings" model, and this script is only coloring one of them. How do I color all of them?
EDIT: Another method I tried is:
local wings1 = game:GetService("ReplicatedStorage").Recolor.Wings1:WaitForChild("a")
wings1.OnServerEvent:Connect(function(player,part)
local Bird = player.Character:FindFirstChildOfClass("Model")
Bird.Wings:GetChildren("Wing1").Color = Color3.fromRGB(255, 255, 255)
end)
But this makes the script not work entirely.

5 comments
Hi! I tried this script and I got an error on line 4 saying "Expected ( or { or string, got )" and it underlines the ")" after GetChildren in red.
Of course, I see the mistake I made. I edited it, it works now
It seems to give me another error, this time under the "=" after v.Name on line 5 saying "Expected 'then' got '=' "
He typed in "if v.Name = "Wing1" then" not "if v.Name == "Wing1" then""
Thank you!