I have a TextLabel, and i want it's text to be the the player that is the highest in the server, with their torsos y position. I wasn't so sure how to go about doing this, but this is all I got:
repeat wait() until game.Players.LocalPlayer
plr= game.Players:GetPlayers()
value = plr.LocalPlayer.PlayerGui.Value.Value
for i = 1,#plr do
if value > plr[i].PlayerGui.Value.Value then
while wait(1) do
script.Parent.Text = plr[i].Name.. ": ".. value
end
end
end
I'm stumped and I need help.
This is the error I'm getting
http://gyazo.com/7a606d8402010404d1f61a14e7e6453f Here is the game: http://www.roblox.com/games/197480972/---

3 comments
Is this a local script or a server side script?
Script doesn't work with "LocalPlayer", but if you wanted to use a Script then use the "PlayerAdded"
@M39a9am3R it is a local script