i have a script that will find players on a team's names but i have a error
here is my code:
for i,v in pairs(game.Teams["Players"]:GetPlayers())do
wait(2)
local plr = Players:GetPlayerFromCharacter(v)
h.Text = ("The Winners are:"..plr.Name)
end
h is defined and working but whenever i run the code it says:
16:13:55.178 - Workspace.Scripts.Game Flow:69: attempt to index local 'plr' (a nil value)
i check the teams and my player is on the Players team but it still says the error
please help
