local num = 0 local Player = game.Players.LocalPlayer local otherbuttons1 = game.Workspace.Tycoons:WaitForChild(Player.Name) wait(1) local otherbuttons = otherbuttons1.OtherBase.SurfaceGui.TP.otherbuttons local button = game.Workspace.Tycoons[Player.Name].OtherBase.SurfaceGui.TP[0] wait() while true do wait(5) num = 0 local Players = game.Players:GetChildren() for i = 1, #Players do otherbuttons:ClearAllChildren() wait() local player = Players[i] wait() local buttonclone = button:Clone() buttonclone.Parent = otherbuttons buttonclone.Name = num buttonclone.Position = otherbuttons[num].Position + UDim2.new(0,0,100,0) buttonclone.OwnerV.Value = player.Name buttonclone.Owner.Text = player.Name buttonclone.BackgroundTransparency = 0 buttonclone.Owner.TextTransparency = 0 num += 1 end end
THIS IS A LOCAL SCRIPT AND LOCATED IN STARTERPLAYERSCRIPTS. IT WORKS, BUT ONLY ONE PLAYER (THE NEWEST PLAYER THAT JOINED IN THE SERVER) POPS UP ON THE SCROLLING GUI.
This script is supposed to show all the players inside of a scrolling gui, so when you click on it, it will tp to their base (this script isnt added yet, but it will be.) But for some reason, the newest player that joined only shows up on the board. The board updates every 5 seconds, and I could add a player left function which updates the board when a player leaves.
PICTURE OF THE BUG https://imgur.com/gallery/hv61eyX
NEVER MIND, I FIXED IT. I JUST MOVED CLEAR ALL CHILDREN TO A DIFFERENT PLACE.