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