If you noticed my last question, this is what I was asking it for, but I seem to have ran into a brick wall and I would like to find a way to climb it. So here is what I had made so far... It is in a local script.
01 | local plr = game.Players.LocalPlayer |
02 | game.Players.PlayerAdded:connect( function (np) |
03 | game.StarterGui.SetCoreGuiEnabled( "All" , false ) |
04 | for i, player in pairs (game.Players:GetChildren()) do |
05 | GUI = game.ServerStorage.File:Clone() |
06 | plr.PlayerGui.LS.BG:ClearAllChildren() |
07 | GUI.Parent = plr.PlayerGui.LS.BG |
08 | GUI.Position = UDim 2. new( 1 , - 200 , 0 , 20 *(i- 1 )) |
09 | GUI.Text = player.Name |
10 | end |
11 | end ) |
Any idea what is wrong?
There are two problems here.
First, ServerStorage isn't replicated to the client. In simple terms, you can't use ServerStorage with a local script, so instead use ReplicatedStorage.
And Second, this only runs when a player is added to the game (not including the local player). You should instead make that anonymous function a normal function (with a name and all) and use that for the event, as well as call it once for setup.