I have a custom leaderboard that I’m working on, however I have a problem when moving things over to server scripts. It creates a new row to display the new players data, but that row only shows up on the client and not the server, so when I try to edit that information from the server it says it doesn’t exist. Does anyone know why???
Explorer:
Script:
function addplayer(value, isbac)
local nameclone = script.Parent.ImageLabel.ScrollingFrame.TEMPLATE:Clone()
nameclone.Parent = script.Parent.ImageLabel.ScrollingFrame
nameclone.Name = value
nameclone.TEMPLATENAME.Text = value
nameclone.TEMPLATENAME.Name = value
nameclone.Visible = true
if players[nameclone.Name]:IsInGroup(ac) then
nameclone.TEMPLATERANK.Text = players[value]:GetRoleInGroup(ac)
end
if players[nameclone.Name]:IsInGroup(ac) and players[nameclone.Name].Team ~= game.Teams.Bandits then
nameclone.AC.Visible = true
elseif players[nameclone.Name]:IsInGroup(gto) and players[nameclone.Name].Team ~= game.Teams.Assassins then
nameclone.GTO.Visible = true
end
players[value]:GetPropertyChangedSignal("Team"):Connect(function()
if players[value].Team == game.Teams.Assassins then
nameclone[value].TextStrokeColor3 = Color3.new(0, 0.333333, 0.498039)
elseif players[value].Team == game.Teams.Bandits then
nameclone[value].TextStrokeColor3 = Color3.new(0.666667, 0, 0)
elseif players[value].Team == game.Teams.Citizens then
nameclone[value].TextStrokeColor3 = Color3.new(0.65098, 0.67451, 0.415686)
end
end)
end
players.PlayerAdded:Connect(function(player)
addplayer(player.Name)
end)
I ended up just scrapping the way I was doing it and trying another avenue. I ended up creating the UI elements from ServerScriptService into each replicated GUI instead. Sorry for the late reply!