Ad
Log in to vote
0

How do I make an ImageGui someone's character?

Asked by 3 years ago

This is what I have so far (I'm trying to make it so that the image change is visible to everybody, but everybody's profile pictures are only visible to the last person who joins the game, the script is in a local script, in StarterGui)

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 1 then
        game.Players.LocalPlayer.PlayerGui.Game.Player1.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player1.PName.Text = v.Name
    end
end

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 2 then
        game.Players.LocalPlayer.PlayerGui.Game.Player2.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player2.PName.Text = v.Name
    end
end

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 3 then
        game.Players.LocalPlayer.PlayerGui.Game.Player3.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player3.PName.Text = v.Name
    end
end

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 4 then
        game.Players.LocalPlayer.PlayerGui.Game.Player4.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player4.PName.Text = v.Name
    end
end

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 5 then
        game.Players.LocalPlayer.PlayerGui.Game.Player5.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player5.PName.Text = v.Name
        end
    end

for i,v in pairs (game.Players:GetPlayers()) do
    if game.Players.NumPlayers >= 6 then
        game.Players.LocalPlayer.PlayerGui.Game.Player6.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..v.Name
        game.Players.LocalPlayer.PlayerGui.Game.Player6.PName.Text = v.Name
    end
end

Answer this question