local Parts
script.Parent:GetConnectedParts(Parts)
Parts.BrickColor = BrickColor.Blue()
I Do Not Understand Why
local Parts
script.Parent:GetConnectedParts(Parts)
Parts.BrickColor = BrickColor.Blue()
I Do Not Understand Why
Well, you aren't using any tables to store the actual parts.
What GetConnectedParts does, it returns a table of all parts connected to the part on which you call that method on.
What you should do is:
local Parts = script.Parent:GetConnectedParts()
for _,part in pairs(Parts) do
if part ~= script.Parent then
part.BrickColor = BrickColor.Blue()
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
What are you trying to do? Get all Parts that are connected to script.Parent and make their color blue?
Yep exactly
this is a terrible code section. cant tell us anything
That is not a section its the full code