My error is at line 10 and 9. I am trying to show the player avatar on a gui shown to all players. My error in the output is "Nil" and I believe it is the print function. but it is caused by line 10
01 | local pic = script.Parent |
02 |
03 | local player 1 = game.ReplicatedStorage.heist 1 Values.Player 1. PlayerName |
04 | print (player 1. Value) |
05 |
06 | while wait( 0.1 ) do |
07 |
08 | if player 1. Value ~ = "none" then |
09 | local player = game.Players:GetChildren(player 1. Value) |
10 | print (player.DisplayName) |
11 | --local player = game.Players.LocalPlayer |
12 |
13 | if player.Name = = player 1. Value then |
14 |
15 | local userId = player.UserId |
Tried it in studio and it works like that
01 | local pic = script.Parent.pic |
02 |
03 | local player 1 = game.ReplicatedStorage.heist 1 Values.Player 1. PlayerName |
04 | print (player 1. Value) |
05 |
06 |
07 |
08 | while wait( 0.1 ) do |
09 |
10 | if player 1. Value ~ = "none" then |
11 | local player = game.Players:FindFirstChild(player 1 ) |
12 | print (player.DisplayName) |
13 | --local player = game.Players.LocalPlayer |
14 |
15 | local userId = player.UserId |
keep in mind its modified a little so if there is something i have missed tell me