This script is suppost to pick random frames out of surfaceguis and change there color but for some reason it doesn't. Can anyone fix this issue??
local LetterTable = {
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
}
function Spread(color)
for i,v in pairs(game.Workspace.danzflor.MidDanceFloor.Pads:GetChildren()) do
local chosenPad = LetterTable[math.random(1,#LetterTable)]..math.random(1, 10)
if chosenPad.ClassName~="Frame" then
print(chosenPad)
return chosenPad.BackgroundColor3 == color
end
end
end
I remove the repeat but now it still won't change it's color.

2 comments
It's not working because you aren't calling the function...
I am not that dumb to not fire the function. I didn't added it as it's a simple script.