#"nil" for some reason doesnt show up on 2007 roblox leaderboard gui (no outputs)
1 messages · Page 1 of 1 (latest)
??
module script
local nilJoined = {}
local Players = game:GetService("Players")
local PlayerGui = game:GetService("PlayerGui")
function nilJoined.Trigger()
for _, player in Players:GetPlayers() do
local show_nilAttribute = player.PlayerGui.StartGui.tray.Script:GetAttribute("show_nil")
player.PlayerGui.nilJoined.Enabled = true
player.PlayerGui.nilMessages.Enabled = true
show_nilAttribute = 1
end
end
return nilJoined
2007 roblox leaderboard script
function update()
c = script.Parent:GetChildren()
for i = 1,#c do
if string.sub(c[i].Name, 1, 11) == "PlayerLabel" then
c[i].Visible = false
end
end
for i = 1,#plr do
item = script.Parent:findFirstChild("PlayerLabel" .. tostring(i))
if (item~=nil) then
item.Visible = true
item.Text = plr[i].Name
end
end
end
function getNumber(obj)
for i = 1,#plr do
if plr[i]==obj then
return i
end
end
end
plr = {}
p = game.Players:GetChildren()
for i = 1,#p do
table.insert(plr, p[i])
end
update()
game.Players.ChildAdded:connect(function (guy) table.insert(plr, guy) update() end)
game.Players.ChildRemoved:connect(function (guy) table.remove(plr, getNumber(guy)) update() end)
local show_nilAttribute = script:GetAttribute("show_nil")
if show_nilAttribute == 1 then
update()
table.insert(plr, "nil") update()
else
update()
end
"nil" for some reason doesnt show up on 2007 roblox leaderboard gui (no outputs)
idk why roblox studio lua acts weird for me
** You are now Level 11! **
fym nil doesn't show up
** You are now Level 14! **
Peak
So you're making a fake player?
yeah just for my horror arg game
bro when i looked in PlayerGui, the attribute "show_nil" isnt set to true (and ive changed those 1 and 0 to true and false)
You'll have to make a custom leaderboard for it to work
bro 2007 roblox leaderboard is a gui
not normal roblox one
Your code is making 0 sense.
wdym
you're adding nil to some table where you hold palyers
but you're checking some random parent for children??
ANd also HUGE no no
theres a attribute
You need local variables
i did add a local variable
Your script has no sense of flow
also if you're looping through the plr
Why not just for _, playerVariable in pairs(plr) do
okay well
Also
ima change
oh.
wait so i need to show the item with name nil
If your leaderboard is only going to display names, just insert the names themselves into the plr table
Otherwise add a type check if it's a string value or a player class
Or you can even add simulated players
Where you make a model or folder with all the stuff a normal player has
You're checking if the item ISN'T nil
Therefore it will make everything have the text nil
i gtg eat
I'll be back in 30ish mins
also nevermind
I misread it
Everythings aight
k
bro when i triggered the event where nil joins, the attribute didnt change at all
local nilJoined = {}
local Players = game:GetService("Players")
local PlayerGui = game:GetService("PlayerGui")
function nilJoined.Trigger()
for _, player in Players:GetPlayers() do
local show_nilAttribute = player.PlayerGui.StartGui.tray.Script:GetAttribute("show_nil")
player.PlayerGui.nilJoined.Enabled = true
player.PlayerGui.nilMessages.Enabled = true
show_nilAttribute = true
end
end
return nilJoined
its literally supposed to enable the attribute
hang on what if i add BoolValue object to the script then use that to manage if nil shows up in player list or not
okay well the BoolValue called "show_nil" showed that its Enabled in playergui but nil didnt show up on player list
afk
Dude
You need to use :SetAttribute
:GetAttribute returns the value of the attribute
Not the attribute itself
ill come up with new way to show nil on player list, i have changed the attribute to BoolValue object
but i have to like afk rn
@summer zenith bro, nil still doesnt show up. like wth, i only set Visible to true and change text to "nil" but for some reason it doesnt show up
if show_nilAttribute.Value == true then
if script.Parent.PlayerLabel1.Visible == true then
if script.Parent.PlayerLabel2.Visible == true then
if script.Parent.PlayerLabel3.Visible == true then
else
update()
script.Parent.PlayerLabel3.Visible = true
script.Parent.PlayerLabel3.Text = "nil"
end
else
update()
script.Parent.PlayerLabel2.Visible = true
script.Parent.PlayerLabel2.Text = "nil"
end
else
update()
script.Parent.PlayerLabel1.Visible = true
script.Parent.PlayerLabel1.Text = "nil"
end
end
update()
game.Players.ChildAdded:connect(function (guy) table.insert(plr, guy) update() end)
game.Players.ChildRemoved:connect(function (guy) table.remove(plr, getNumber(guy)) update() end)
FINALLY I MADE HIM APPEAR