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

Question, how would i make it so this script make the player see a gui or textlabel within a gui?

Hello, my name is chronofantastic and i'd like to ask how would i make it so a player sees a gui or textlabel within the gui? Here is my short code, please dont be rude to me or unkind.

local gui = game.Players.LocalPlayer.PlayerGui

gui = game:GetService("Players").LocalPlayer.PlayerGui

gui.Info1.SecA.Visible = true

I know it isnt much, but please dont be mean to me as this is my first question asked.

2 comments

0

Don't worry, we won't be mean. :)

0

Where is this script located? Is it in the player, or in the Workspace? I need to know that to be able to respond.

1 answer

✓ Accepted answer

Hello! Thanks for joining the community.

To do what you are asking, simply use a Hint, which is small text box GUI that appears at the top of the screen:

function showMessage(player, text, duration)
	game.Players:WaitForChild(player)
	local hint = Instance.new("Hint")
	game.Players[player]:WaitForChild("PlayerGui")
	hint.Parent = game.Players[player].PlayerGui
	hint.Text = text
	wait(duration)
	hint:Destroy()
end

Usage:

showMessage("ChronoFantastic", "Congrats on your first question!", 5)

7 comments

0

If you want a ScreenGui instead, I can show that way too. Just tell me and I will edit this answer. But this is way simpler!

0

Hint’s are deprecated.

0

Not sure but I think he wants to show specific already created gui with some text, idk

0

^ Yes, its true what kiriot22 just said.

0

Its also in the workspace.

0

I didnt mean a hint, but it works, so its accepted!

0

Thanks!

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