Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

why i cant change the text from a GUI?

(experience level= 0)

hello, i use

         local hint = game.StarterGui.ScreenGui.TextLabel

          hint.Text = "Let Play"

But it doeset work... it did work for like.. 2 times, but now it doesent work do i need to change a setting in TextLabel? also, the script from before its in workspace.

before, i used a Board that was in workspace and it work, but now i want the text to be on screen,i tryed 2 YT videos, but i cant figure it out.

1 comment

0

Is the Script a LocalScript or a Normal Script

2 answers

✓ Accepted answer

Your trying to edit StarterGui, StarterGui is just what gets copied to PlayerGui when a player joins or respawns.

You need to change game.StarterGui to:

game.Players["PlayerName"].PlayerGui.ScreenGui.TextLabel

if this is a local script and your only changing the current player you can use:

game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel

4 comments

0

Thanks, this is a normal script, not a local script, btw, how i make it work whit all the players on the game?

0

li tryed: Local hint = game:GetService("Players").PlayerGui.ScreenGui.TextLabel

0

Also, when my character dies, i no more see the text, but when the script restarts it works.

0

If you want to continue to see the text, In the ScreenGui Instance when not play testing, set ResetOnSpawn to false

hey you! have you ever heard of enes? if you are in trouble, better call enes!

This discussion is preserved as it was. New answers, comments, and votes are closed.