Please help me, Menu Opened Text Visible

I am really having trouble with this problem, I have searched everywhere for answers but to no avail. Maybe if I post this in the forum, I will get the answer to my problem:


I want to create leave text with sound, where if the player presses the Esc key to exit then the text and sound will appear, and also if the player presses Esc again then the text and sound will turn off.

  1. Game example Video

  2. Me Game Video

please help me with this problem, :sleepy: :pray:

local TextTesting = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui")
local spb = script:WaitForChild("Sound")
local GamesERS = game:GetService("Players").LocalPlayer
local enabled = false

game:GetService("GuiService").MenuOpened:Connect(function()
	if enabled == false then
		enabled = true
		spb:Play()
		TextTesting.TextLabel.Visible = true
	else
		enabled = false
		spb:Stop()
		TextTesting.TextLabel.Visible = false
	end
end)

How shameful…… using such methods to get players to say in your game
I will NOT be helping you

3 Likes

the text in the studio is just a fantasy, I just want to make it like in the game I play, and I will change the text

Well, you’ll have to use 2 events for it to work im pretty sure…

GuiService.MenuOpened - for when the player OPENS the escape menu
GuiService.MenuClosed - for when the player EXITS the escape menu

From there I’d just add a local script in a gui that would make it visible and play the noise in menu open, and remove it in menu closed

1 Like

Thank you, your answers are what I was looking for. Thank you :innocent: :smiling_face_with_three_hearts: :pray:

feels like ure trying to spam players. :sweat_smile:

1 Like

I am making a UGC game where players have to wait for a while to get the UGC, I made it so that players don’t complain

So you are saying that user retention rate is your primary goal. If extreme methods are used to try retain players, then I personally would never ever open this game again. I wouldn’t recommend doing this outside of any meme games.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.