So currently I made a script in ServerScriptService and it will change a NumberValue inside a player's PlayerGui, said NumberValue is inside a Gui called "Role".
But I keep getting an error saying that Role is not a valid member of PlayerGui.
I've tried doing :WaitForChild() as well but then I get a message saying that an infinite yield is possible.
This is basically it that I did:
local random = players[randomPlayer].PlayerGui.Role.ROLE
I am choosing a random player and then I am trying to change something inside their PlayerGui, but for some apparent reason the Gui isn't a valid member. I've checked it on the Explorer when in-game and it's also there. If someone knows why, please help. Thanks.
You can look at the GUI's structure here

2 comments
Can I get a screenshot of the GUI's structure please?
There, I edited it.