Run it
Copy the script and paste it into your executor.
local part = script.Parent
local clickDetector = part:FindFirstChild("ClickDetector")
-- Function to generate a random BrickColor
local function getRandomColor()
local r = math.random()
local g = math.random()
local b = math.random()
return Color3.new(r, g, b)
end
-- When the part is clicked
clickDetector.MouseClick:Connect(function(player)
part.Color = getRandomColor()
print(player.Name .. " clicked the part! Color changed.")
end)H̠̣͈͎͈ͧͪ͒̈́̓ḙ̯͈̮̔ͥͬ̃̓ͭ ̗̀́̔͌̍cͤ̔ͩ̆o͙̘̖̤̳͈̹̓̍̌ͦͪ̋m̽̌̅̅̇e̳̤͎̰̣s̥̻̎,͇̂ͪͤͥ̚ ͙̻̟̯̤͖͍ͧ́̀̊̏̓z̖͙̩̝ͧͤa͍̦̫̝͔̪̋ͯ̋l̃ͤͩ̄̌g̙ͤ̇õ̫

Universal