i seriously do not know how to fix this
in studio, there are zero errors whatsoever, and gui’s are fine. but in roblox, gui’s don’t work, and everything parented to a gui or startergui (same as playergui) says its parent is nil
-- ChangeSize
local textService = game:GetService("TextService")
local label = script.Parent:WaitForChild("TextLabel") -- attempt to index nil with WaitForChild
-- enabler
script.Parent.Enabled = true -- attempt to index nil with Enabled
script:Destroy()
-- literally just so that you don't have it while in studio
and its not even consistent
sometimes when i join it shows different errors, for example this one??
i do not have any scripts named either of those, neither of them are mine (and even if i search in the explorer they don’t come up)
but that only happens like 1/4th of the time
im starting to believe my scripts are cursed when script.Parent is nil
i tested these a bit more, and it turns out i straight up just don’t have a Player.PlayerGui
every instance inside startergui is parented to nil (yet the scripts still run…? but all guis are invisible / destroyed) and if i print every instance inside player it doesn’t print PlayerGui
(its not like i’m trying to access another player’s gui, i’m trying to access my own playergui from a localscript.)
CharacterAutoLoads is true, printing that prints “LocalScript”
i can’t imagine that the character would be making a difference here, none of these scripts are inside startercharacter or even reference the character before that line
This error occurs to me a lot because of network issues, It happens when the script loads before the other instance
-- ChangeSize
local textService = game:GetService("TextService")
local label = script.Parent:WaitForChild("TextLabel", 999) -- attempt to index nil with WaitForChild
changing the timeout to something high like 60 or 999 or ∞ fixes the issues for me
no, it’s not the thing trying to access it before its loaded, the playergui just doesn’t exist at all
all the gui’s i put in startergui are just entirely voided
okay i fixed it, my friend (who is also making this with me) created a script that accidentally destroyed the entire playergui (rather than just the gui it was supposed to destroy) when it wasn’t in studio