I wrote the code for a GUI and it worked flawlessly in Studio but not in Test/Play mode.
I figured out the problem is the first bit of code: local p = game.Players.Player1.PlayerGui.ScreenGui.PlayerLoadout
But I don't know how to make it accessible to all players instead of just Player1. Help?

2 comments
Neither of the above methods work. I'm getting:Players.Player.PlayerGui.ScreenGui.MainMenu.Loadout.Loadout:7: attempt to index global 'p' (a nil value)
Sorry for the delayed response. What is the exact error you're getting? (You should be using game.Players.LocalPlayer, not game.Players.Player))