The player with the most KO's at the end of the round needs to be displayed on a gui as "the MVP." The gui is done, but the scripting is more challenging than I thought and I have yet to find any helpful answers or links.
✓ ANSWER ACCEPTED
How do I put a player's picture and name into a gui?
1 answer
✓ Accepted answer
topko = 0
plrname = nil
for i,v in pairs(game.Players:GetChildren()) do
if v:FindFirstChild("leaderstats"):FindFirstChild("KOs").Value >= topko then
topko = v:FindFirstChild("leaderstats"):FindFirstChild("KOs").Value
plrname = v.Name
end
end
Winner = plrname
TextLabel.Text = "MVP "..Winner
ImageLabel.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&username="..Winner
If this helped please press the up button and press answered this question next to my name!
This discussion is preserved as it was. New answers, comments, and votes are closed.

11 comments
thanks! Question: How would the game know who the "winner" is?
I'll add that one second, also please up me!
Thanks! How will this look, and is there a way to change the look?
You can't change the look, except changing the x=200 and y=200 to different values. It will show their profile picture.
okay, thanks
Sorry, one more thing, can i use this script in an already existing gui?
Sure just edit the items to your extent.
IM SO SORRY xD, but where the heck do i put the script? the gui and buttons and everything is made but.... sigh... i have no idea. I'm new to Gui's
I'm going to guess if FilteringEnabled was turned off you could use a LocalScript under the "ScreenGui".
Thanks, it's working except the text is not. the image is displaying but not the text.
StarAd and I are working together on a project involving this, and I have a concern with the script. The MVP of the round various between people. Any fix?