How would I make a side bar like tower of hell?

Hello everyone, I was wondering how would I make a height bar or width bar like tower of hell.

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.

If any of you need more information just ask :slight_smile:

All the help would be appreciated :happy3:

2 Likes

I hope this video helps you. https://www.youtube.com/watch?v=Hv1LjYq1lyo

2 Likes

I would I generate the colours tho, do I need like a camera or something else?

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.

2 Likes

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?

for example:

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
2 Likes

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.

Good luck.

1 Like

Thank you very much everyone I appreciate your help.

I have one more question how would you pass a table to another script?

BindableEvents or ModuleScripts and pass them through function arguments

1 Like

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.

Video isn’t available anymore, is anyone aware of a new tutorial?