If statement problems

I want when I click on a specific part and then it will randomly choose which color the part will be

Local script - png

Local script ~~~~~~~~~~~~~~~~~~~~
local Img = script.Parent
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

mouse.Move:Connect(function()
mouse.Button1Down:Connect(function()
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA(“Part”) then
if v.Name == “SpawningPart” then
mouse.Target.BrickColor = BrickColor.Random()
end
end
end
end)
end)

The problem is that it doesn’t paints “SpawningPart” it just checks if v:IsA(“Part”) and then paints if it is a part I want to make it that it only paints “SpawningPart”

First of all, you don’t need the mouse.move:Connect(function) you only need the button1down event. Secondly, don’t do mouse.Target.BrickColor, just do v.BrickColor