#text is overlapping when theres more than 1 person in the game

71 messages · Page 1 of 1 (latest)

vernal garden
#

also don't post twice man

ashen tapir
#

so dont worry theres no dupes

vernal garden
#

"Very far down script help". But thanks for deleting it

ashen tapir
#

press unfollow

vernal garden
#

Still right next to each other

ashen tapir
#

i have no idea bro why do you even care

#

i just askd for help

vernal garden
#

I don't-- I even thanked you for deleting it. I posted that in response to what you said

#

No need to call me the villian lol

ashen tapir
#

soryr

#

can you help me

vernal garden
#

Yeah-- try using UIListLayouts to space them out

ashen tapir
#

i dont kow how i wanted someone to explain it

#

reading roblox docs kinda confuse me

#

specificaly that one

vernal garden
#

What UIListLayouts do is automatically position any GUI objects in its range in a list

#

So it would look kind of like this:

#

Before:

#

After:

ashen tapir
#

how do i use it?

vernal garden
#

Just take the UIListLayout instance from the plus menu and put it in the folder that contains all of the GUI objects you want to place

#

For your use case, I don't think you'd even have to change any of its properties and junk

ashen tapir
#

OHH

#

wait i acutally love you

vernal garden
#

I felt the same way when I learned about them

ashen tapir
#

ok wait

#

wait nvm

#

im slow

ashen tapir
vernal garden
#

What's its filepath in studio?

ashen tapir
#

file path of what?

#

that?

#

im so confused why i cant see it

#

i deleted the UI thing and its still not there

#

nvm i fixed it

#

it wasnt active for some reason

vernal garden
#

wasn't active?

ashen tapir
#

nope

vernal garden
#

Like .visible was false?

ashen tapir
#

no this was ticked in properties

#

it was off

vernal garden
#

huh-- the more you know

#

had me flipping out trying to figure out what went wrong lol

ashen tapir
#

is there a way to tweek the order the ui loadout puts things in with script

ashen tapir
vernal garden
ashen tapir
#

cause im gunn add ranks just wanted to make sure

#

thank you so much jedi tbh i was trying to figure this out for like 4 hours before asking anyone

vernal garden
vernal garden
#

What I would do if you want to filter them by ranks is to put all the players in a table, sort the table using table.sort, then systematically increase the layout order of each object

ashen tapir
ashen tapir
#

Jedi

#

@vernal garden

#

one last thing not sure if yk

#

when someone leaves there name doesnt get removed but i have something for that on the last line

#
local Players = game:GetService("Players")
local name_box = script.Parent.PlayerList.Frame.names


local function createNewText(Player)
    local newText = name_box:Clone()
    newText.Text = Player.Name
    newText.Name = Player.Name.."Frame"
    newText.Position = UDim2.new(0, 5, 0, (#name_box:GetChildren() * 10))
    
    newText.Parent = script.Parent.PlayerList.Frame.ScrollingFrame
end

local function deleteText(Player)
    local TextName = Player.Name.."Frame"
    local Text = name_box.Parent:FindFirstChild(TextName)
    if Text then
        Text:Destroy()
    end
end

for _, player in ipairs(Players:GetPlayers()) do
    createNewText(player)
end


Players.PlayerAdded:Connect(function(player)
    createNewText(player)
end)


Players.PlayerRemoving:Connect(function(player)
    deleteText(player)
end)
jolly sinew
#

name_box.Parent is script.Parent.PlayerList.Frame

ashen tapir
ashen tapir