How could I check if a child of a model is touched using one script, not inside of the child?

So, in my game, I cleaned up my scripts (they were messy) and now, I want to check if the child is touched without the script in the child (over a thousand parts with same name).

  1. What do you want to achieve? I want to control what color the part changes to based on the team the player is on, without the script being in the part.

  2. What is the issue? I can’t find what I should do, or start with.

  3. What solutions have you tried so far? I haven’t tried any because I haven’t found out what to start with,

(mods, change my topic if it is wrong.)
Thank you!

I think I know how to do this, but could you send a screenshot of the model with the child please?

image
this was one of 3 maps

Okay, place a script in Terrainian that says this:

local cubes = script.Parent.Paintableparts:GetChildren()

for i,v in pairs(cubes) do
   v.Touched:Connect(function(hit)
      --put whatever you need to happen if any of the cubes get touched right here
   end)
end
local player = game.Players.LocalPlayer
local playerTeamColor = player.Team.TeamColor

for i, v in pairs(workspace.Terrainian:GetDescendants()) do
	if v.Name == "PaintedCube" then
		v.Touched:Connect(function(otherPart)
			if otherPart.Parent:FindFirstChild("Humanoid") then --checks if player touched
				v.BrickColor = playerTeamColor
			end
		end)
	end
end

Local script parented to StarterPlayerScripts folder.