I am attempting to reference the player through game.Workspace[player.Name] . It's not working, why is this?
game.Players.PlayerAdded:Connect(function(player) print(game.Workspace[player.Name].Name) -- Printing name of player in workspace. end)
My username is N43FGXL and I get the error: N43FGXL is not a valid member of Workspace When I check the explorer, the model of my character is in the workspace...
You are confusing the player and the character. The character is the player's physical representation in-game. Just because the player has joined doesn't mean their physical appearance has loaded. To do what you described:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function (char) print(char.Name) -- char is equivalent to workspace[player.Name] end) end)
You are over complicating things. It's actually quite simple!
game.Players.PlayerAdded:Connect(function(player) print(player.Name) end)