I am extremely novice when it comes to custom code and i just found a snippet in github to do what i need, but there are some things i need to adjust and im not quite sure how to do that. i wanna change the width of icons depending on the amount of abilities im using while also having some space in between them all while taking the same amount of space, and ive found a code that can do that for the most part. the issue is that whenever an ability is added space is also added and that space bypasses the total width of the aura i want to use, basically making the overall width of the aura inconsistent, even though it works fine when there are no spaces in between the icons. any idea on how i can fix this type of issue? here is the custom growth ive been using that i found somewhere.
local totalWidth = 356
local width = totalWidth / #activeRegions
for i = 1, #activeRegions do
activeRegions[i].region:SetRegionWidth(width-2)
newPositions[i] = {
i*(width+2) - totalWidth/2 - (width+2)/2, -- x
0 -- y
}
end
end```