How would I generate the exact color of the stage?
Ex: I have a generating stage script, when a new round comes up how would I generate the same colors as the stages in the height bar or width bar.
get the total height of the map, then find the percentages of the different colored regions in it, then convert that proportion to a frame by creating new colored frames in the long frame.
what do you mean by that, how would find the percentages of the different colored regions in the total height of the map? And then convert it into new colored frames?
local model = <towermodel>
local regions = {}
local totalYsize = 0
for _, v in pairs(regions) do
totalYsize += v.Size.Y
end
for _, v in pairs(regions) do
local prop = v.Size.Y / totalYsize
-- createANewFrameWithYScaleEqualToProp()
end
Either that or depending on how you generate your stages, you could add a Color3Value to each of the stages representing each stage’s color.
From there, once the stages are loaded in, create a table of the stage colors in order and pass it to whatever script handles the colors in your stage bar and then color the sections of the bar according to the passed table.
This might not work, I haven’t tested this and I’m not a scripter, but that’s how I would do it.
Sry to bother you again but how would I from a local script read what’s in a table which is in a module script in ServerScriptServices is that possible, and how would I add colors to the table from another server script.