You would use a for loop for this.
for i,v in pairs(game.Players:GetPlayers()) do
print(v.Name)
end
That would print the name of all the player's in game. If you notice, though, there's one special peice of code here.
for i,v in pairs(game.Players:GetPlayers()) do
What this does is says "for each player inside of game.Players, do"
So you have Player objects, not player's characters yet. Getting a player's character is easy, though. Player's have a Character property! We just set the player's character's torso's Transparency property to 1, as you would in the properties panel!
v.Character.Torso.Transparency = 1
If we put this all together we get this:
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Torso.Transparency = 1
end
1 comment
Thank you!