Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why wont it show the player name?

Asked by 9 years ago

The output says streak is not a valid member of player please help.

hint=Instance.new("Hint") 
hint.Parent=workspace 
hint.Name="LargestStreak" 
while true do 
highestStreak=0 
p="" 
for _,player in pairs(game.Players:GetChildren()) do 
if player.streak.Value>highestStreak then 
p=player.Name 
highestStreak=player.streak.Value 
end 
end 
hint.Text=p.." has the biggest streak with the kill streak of "..highestStreak.."!" 
wait() 
end
0
Is the streak a leaderstat? Put line 5 before line 4. If it's in the while loop, it'll keep going back to 0. Shawnyg 4330 — 9y
0
no the streak works this is suppsoe to print the player with the highest streak but the player name is not showing up threatboy101 2 — 9y

Answer this question