this is a local script, i have a server script that has the player stats in there, I just made a part to give me exp to test it out, everything works find but when I try to update my GUI with the players level, it doesn’t work
You have to use remoteEvents so the server gives the exp to the client and the gui should update
You’re not referencing the correct GUI instance. StarterGui is merely a storage container for the game’s UI, and is not where the active UI of a client resides.
“When a Player.Character spawns, the contents of their PlayerGui (if any) are emptied. Children of the StarterGui are then copied along with their descendants into the PlayerGui. Note, however, that LayerCollector objects such as ScreenGuis with their ResetOnSpawn property set to false will only be placed into each player’s PlayerGui once and will not be deleted when the Player respawns.”
You must access the client’s PlayerGui folder instead
How would i use playergui? whenevrr i type local playergui = game.Players.PlayerGui
it still doesn’t work
Are you using server script or local script?
You cannot trigger .Touched from a local script that’s a descendant to the workspace
Edited the message to not contain semi false information.
You did not read the related API reference correctly. “PlayerGui” is a folder under the client’s Player instance:
local PlayerGui = Players.LocalPlayer.PlayerGui
Oh i see, i misunderstood what PlayerGui was. Thank you, it works.
Oh my local script is in starter player scripts
Okay that would be helpful to know next time. Glad you got the fix!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
