I'm trying to make a drawing game. The basic structure is a tool that fires a ReplicatedEvent with mouse.Hit.p when activated, a script that makes a part at mouse.Hit.p when the ReplicatedEvent is fired, and then that part should change the color of touched parts. But it doesn't. Here's the script I'm trying to use:
while wait() do
script.Parent.Touched:Connect(function(obj)
print("Touched")
if obj.Name == "Pixel" then
obj.Color = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
end
end)
end
I can't put a script into every single part that I want to change the color of, because there is 6000+ of them. I've been troubleshooting this for a while, and it does print Touched hundreds of times if you step on the part.

1 comment
You title is very confusing, and where did you put the script?