Basically, im working on a game and a bug (i guess) pops out of nowhere for no apparent reason because it was working just fine earlier where the PlayerGui doesn't load in at all, so now I have errors saying "PlayerGui" is not a valid member of Player. This is weird because I turned CharacterAutoLoads back on, and the PlayerGui doesn't appear still. So basically PlayerGui just stopped loading in the Player for no reason at all. Anyone know why this is happening? It is really frustrating and I have no idea why this is happening.
Try a for loop (Server Script):
for _,p in pairs(game.Players:GetPlayers()) do if p.PlayerGui ~= nil then -- Should block the error you're having print("PlayerGui exists") end end
OK SO I FIXED IT. It was the stupidest thing ever. I tried deleting some scripts, and see what would happen and if PlayerGui would appear, and I deleted the script that handled to DataStores, and so I figured out it was that script that was causing the problem. So I did some experimenting with the script, and as it turns out, I RENAMED THE SCRIPT AND IT FIXED THE PROBLEM. WHY DOES THE NAME OF THE SCRIPT HAVE TO HAVE ANYTHING TO DO WITH THIS?!?!? this is so stupid...