attempt to index upvalue 'player' (a nil value)
问题 please help me! I am making a game but i keep running into the same problem i tried many things but nothing worked script.Parent.Humanoid.Died:Connect(function() print("yeet") player.leaderstats.PuzzlePieces.Value = player.leaderstats.PuzzlePieces.Value + 1 end) 回答1: The error : attempt to index upvalue 'player' (a nil value) means that you are trying to use a variable that has not been defined. In this case "player". So you just need to create the player variable by pointing it at the right