So, I've named all the parts in my game which you can paint "Paintable". All the other scripts in the paint gun work, it is enabled, but for some reason this part won't work. Can anyone please fix it?
function onTouched(hit)
if hit.Parent.Name == "Paintable" then
hit.Parent.Color = Color3.new(255/255,0/255,0/255)
end
end
script.Parent.Touched:connect(onTouched)

2 comments
Is this in a local script or a server script?
server script inside spray part inside gun