im working on a script that will generate a path of blocks with all possible rgb combinations, but for some reason the first part is 0,0,0 but every next one is 0,0,1 and it doesnt change.
local currentcolor = Color3.fromRGB(0,0,0)
local currentrow = 1
local posinrow = 1
for i = 1,255^3 do
local block = Instance.new("Part",workspace.Storage)
block.Anchored = true
block.Size = Vector3.new(1,1,1)
block.Position = Vector3.new(0+block.Size.X*currentrow,0,0+block.Size.Z*posinrow)
block.Color = currentcolor
if posinrow < 50 then
posinrow += 1
else
posinrow = 1
currentrow += 1
end
if currentcolor.B < 255 then
currentcolor = Color3.fromRGB(currentcolor.R,currentcolor.G,currentcolor.B+1)
else
if currentcolor.G < 255 then
currentcolor = Color3.fromRGB(currentcolor.R,currentcolor.G+1,0)
else
if currentcolor.R < 255 then
currentcolor = Color3.fromRGB(currentcolor.R+1,0,0)
end
end
end
wait(0.1)
end
well its the same i just added .Value each time i called the currentcolor variable and changed the currentcolor variable to game.ServerScriptService.CurrentColor
I just tested this and this should work, however I must warn you that you are going to be spawning over 10 million parts if you let this run (255^3) so either it will get really laggy or it will take ages to load
local currentcolor = Color3.fromRGB(0,0,0)
local currentrow = 1
local posinrow = 1
for r = 1,255 do
for g = 1,255 do
for b = 1,255 do
local block = Instance.new("Part",workspace.Storage)
block.Anchored = true
block.Size = Vector3.new(1,1,1)
block.Position = Vector3.new(0+block.Size.X*currentrow,0,0+block.Size.Z*posinrow)
block.Color = currentcolor
if posinrow < 50 then
posinrow += 1
else
posinrow = 1
currentrow += 1
end
currentcolor = Color3.fromRGB(r,g,b)
wait(0.1)
end
end
end