Hey, so I’ve been working on a project lately and I’d need some guidance. What I want to achieve !
So here’s the script I’ve been working on, I’ll provide more information if needed like where the things are placed. Thank you!
game.Players.PlayerAdded:Connect(function(plr)
local userId = plr.UserId
local tablePlayers = game.Players:GetPlayers()
local allPlayers = {}
for i in pairs (tablePlayers) do
local playerGui = tablePlayers.PlayerGui.PlayerList
local FrameParent = playerGui.List
local clonedUi = game.ServerStorage.PlayerPointFrame:Clone()
clonedUi.Name = userId
clonedUi.Parent = FrameParent
table.insert(tablePlayers, 1, clonedUi.Name)
wait(1)
end
end)
Also, if you’re wondering why the name has to be changed to “userId” its because I put a local script into the gui which goes something like this.
local playerId = script.Parent.Name
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local imageLabel = script.Parent.ImageLabel
local content, isReady = game.Players:GetUserThumbnailAsync(playerId, thumbType, thumbSize)
imageLabel.Image = content
Now, finally, my main problem is that whenever someone joins, a new player, they will not see the previous players cloned guis.