print(“success”) is printing, but the text in the texlabel does not change.
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local Overheads = game.ReplicatedStorage:WaitForChild("Overheads")
local charhead = char:WaitForChild("Head")
--tables
local noname = {
"Mobile Task Forces";
"Intelligence Agency";
"Internal Security Department"
}
-- trello
local api = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local o5board = api:GetBoardID("O5 Council")
local o5list = api:GetListID("O5",o5board)
local o5members = api:GetCardsInList(o5list)
-- adornee/parent
local O1 = Overheads.Overhead1:Clone()
local O2 = Overheads.Overhead2:Clone()
O1.Parent = charhead
O2.Parent = charhead
O1.Adornee = charhead
O2.Adornee = charhead
-- main
print("starting")
for i,v in pairs(noname) do
print("table has value")
if (player.Team.Name ~= v) or (player.UserId ~= 1) or (player.UserId ~= 978505022) or (player:GetRoleInGroup(4944453) ~= "O5 Council") then
print("success")
O2.TextLabel.Text = player.Name
end
end
for i,v in pairs(o5members) do
if tostring(player.UserId) == v.name then
O2.TextLabel.Text = v.desc
end
end
O2.TextLabel.TextColor3 = player.TeamColor.Color
end)
end)
Although I do remember quite a few times I worked with BillboardGuis and used Changed events on them (server sided I believe) to update their elements, like for an XP bar, and I think it worked fine.
The problem with having systems like this serverside only, is that it will only work on the last player that joined as the data is overwritten. I made a healthbar that was completely serversided and it would change all the players health to the last player who joined’s health once it updated.
Is the text equivalent to v.desc after running this? You have two loops changing the same property so if the second loop’s if statement passes then player.Name will always be written over by the second loop.
How come now the text is changing to the end intelligence agency/isd stuff?
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local Overheads = game.ReplicatedStorage:WaitForChild("Overheads")
local charhead = char:WaitForChild("Head")
--tables
local noname = {
"Mobile Task Forces";
"Intelligence Agency";
"Internal Security Department"
}
-- trello
local api = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local o5board = api:GetBoardID("O5 Council")
local o5list = api:GetListID("O5",o5board)
local o5members = api:GetCardsInList(o5list)
-- adornee/parent
local O1 = Overheads.Overhead1:Clone()
local O2 = Overheads.Overhead2:Clone()
O1.Adornee = charhead
O2.Adornee = charhead
-- main
for i,v in pairs(noname) do
if (player.Team.Name ~= v) or (player.UserId ~= 1) or (player.UserId ~= 978505022) or (player:GetRoleInGroup(4944453) ~= "O5 Council") then
O2.TextLabel.Text = player.Name
end
end
for i,v in pairs(o5members) do
if tostring(player.UserId) == v.name then
O2.TextLabel.Text = v.desc
end
end
if player.Team.Name == "Intelligence Agency" or "Internal Security Department" then
O2.TextLabel.Text = "[DATA EXPUNGED]"
O1.TextLabel.Text = "REDACTED"
end
O2.TextLabel.TextColor3 = player.TeamColor.Color
O1.Parent = charhead
O2.Parent = charhead
end)
end)