what’s the type of colour? if it’s a color3, then the issue is that you’re pretty much doing Color3.new( Color3.new(...) ). you’d just use Moves[…] as the color in that case
redo.MouseButton1Down:Connect(function()
print(moves)
for _,v in pairs(moves)do
if _==#moves then
local tp = typeof(v)
if tp ~= "number" then
v:Destroy()
moves[_]=nil
else
for i = 1,v do
local colour = moves[_-(v+1)]
print(colour)--prints 1, 0.105882, 0.121569
moves[_-i].Color = colour--part goes black
end
for i = 1,v do
moves[_-i] = nil
end
moves[_-1] = nil
moves[_] = nil
moves[#moves] = nil
print(moves)
end
end
end
end)
usually, you’d use _ as a placeholder if you don’t need it. you should use index, i, key, or k instead
could I see what the output is showing when you click once?
ye I was using it as placeholder then I changed how I was going to use the function and didn’t go back and I know what they stand for. But here is the output on one click:
-first table is what is started with
-second table values of the ones that were filled with the amount at end and colour at start
-third print is just the colour
-fourth table is after wiping colour value stuff since they should have changed colours