How would I go about adding the names of players into a frame, apart from your own player's name? Sort of like everyone else's name is in the frame apart from your own, I'm creating a WHODUNNIT game and you have to vote off the suspected killer, but I don't know how you would add players to the frame but make it that your own name doesn't show up
COMMUNITY QUESTION
Listing players into a frame?
1 answer
You would use I-Pairs with a local script, and everytime someone joins or leaves you update it:
Player = game.Players.LocalPlayer
function UpdatePlayers(PlayerName)
for i, v in pairs(game.Players:GetChildren()) do
if v.Name ~= Player.Name then
--Here you would add a frame corresponding to the name and number
--The playerNumber is: i
--The playerName is: v.Name
else
--Here is Your name in the game
--The position of Your name
end
end
end
UpdatePlayers(Player)
game.Players.PlayerAdded:Connect(UpdatePlayers)
game.Players.PlayerRemoving:Connect(UpdatePlayers)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
me no comprendo
You would put a Ui grid layout, in that frame. Then a script, that when a player joins, it copys a textlabel, or whatever you want their name to be on and puts it into the frame. Then take their name, and put it into the label.
For your own name not showing up, you would use a local script to do that.