I need to know if this code will let me access the player by using newPlayer
1 | local id = 3081313 |
2 |
3 | game.Players.PlayerAdded:connect( function (newPlayer) |
4 | if newPlayer:IsInGroup(id) then |
5 | game.Players.newPlayer.PlayerGui.PCgui.Inventory.Weapons.Show.Rock 2. Visible = true |
6 | else |
7 | print ( "NOPE" ) |
8 | end |
9 | end ) |
-Thanks in advance!
You will not be able to do game.players.Newplayer you need to use the variable NewPlayer for example:
1 | local id = 3081313 |
2 |
3 | game.Players.PlayerAdded:connect( function (newPlayer) |
4 | if newPlayer:IsInGroup(id) then |
5 | newPlayer.PlayerGui.PCgui.Inventory.Weapons.Show.Rock 2. Visible = true |
6 | else |
7 | print ( "NOPE" ) |
8 | end |
9 | end ) |