Accessing NumberValue in Gui from server script?

I’m trying to make a script where it’ll check for a numbervalue in a StarterGui Frame, but I have no idea on how to do it. I tried searching up on DevFourms, even ScriptingHelpers, but couldn’t find anything. How would I go about that?

Assuming that you have it in startergui it should just replicate to the player’s screen. However if you want to actually access it through a localscript you would do something like this…

  • Assuming you have the script inside of the actual screengui or surfacegui holder and not inside the frame and the value has the same parent.

local numberValue = script.Parent.NumberValue.Value

if you need to do this with something like A serverscript and get an instance inside of the players gui you would need to first know the name of the player and than the code from there would look like this…

local player = game.Players.BostonWhaIer -- I just put my name but just put the name of the player you are trying to get the value from

local numberValue = player.PlayerGui.GUINAMEHERE.NumberValue.Value

I really hope this helps you, Good Luck! :slight_smile:

Thank you so much, it works!!!

No problem man, if you could just mark my reply as A solution so people don’t have issues finding something like this in the future, again I wish you all the best. Happy Holidays, Boston.