Skip to main content
Formatting, describe what's "not working" in title.
Source Link
DMGregory
  • 136.3k
  • 22
  • 247
  • 373

My GUI TextButton isn't workingfails to show emoji display when clicked

So I want to create a GUI where, when I click a button, an emote display pops up, and when I click an emote, it closes.

Currently, now my display won't even show when the button is clicked. This is my code, can anyone help me?

""" local button = game.StarterGui.ScreenGui.EmoteButton.TextButton local emoteDisplay = game.StarterGui.ScreenGui.EmoteDisplay local emoteDisplayButtons = emoteDisplay.Emotes:GetChildren()

button.MouseButton1Click:Connect(function() print("Emote Button clicked.") emoteDisplay.Visible = true for emote in emoteDisplayButtons do emote.MouseButton1Click:Connect(function() print(emote.Name + "Button clicked") emoteDisplay.Visible = false end) end end) """

local button = game.StarterGui.ScreenGui.EmoteButton.TextButton
local emoteDisplay = game.StarterGui.ScreenGui.EmoteDisplay
local emoteDisplayButtons = emoteDisplay.Emotes:GetChildren()


button.MouseButton1Click:Connect(function()
    print("Emote Button clicked.")
    emoteDisplay.Visible = true
    for emote in emoteDisplayButtons do
        emote.MouseButton1Click:Connect(function()
            print(emote.Name + "Button clicked")
            emoteDisplay.Visible = false
        end)
    end
end)

My GUI TextButton isn't working

So I want to create a GUI where when I click a button an emote display pops up and when I click an emote it closes, now my display won't even show when the button is clicked. This is my code, can anyone help me?

""" local button = game.StarterGui.ScreenGui.EmoteButton.TextButton local emoteDisplay = game.StarterGui.ScreenGui.EmoteDisplay local emoteDisplayButtons = emoteDisplay.Emotes:GetChildren()

button.MouseButton1Click:Connect(function() print("Emote Button clicked.") emoteDisplay.Visible = true for emote in emoteDisplayButtons do emote.MouseButton1Click:Connect(function() print(emote.Name + "Button clicked") emoteDisplay.Visible = false end) end end) """

GUI TextButton fails to show emoji display when clicked

I want to create a GUI where, when I click a button, an emote display pops up, and when I click an emote, it closes.

Currently, my display won't even show when the button is clicked. This is my code, can anyone help me?

local button = game.StarterGui.ScreenGui.EmoteButton.TextButton
local emoteDisplay = game.StarterGui.ScreenGui.EmoteDisplay
local emoteDisplayButtons = emoteDisplay.Emotes:GetChildren()


button.MouseButton1Click:Connect(function()
    print("Emote Button clicked.")
    emoteDisplay.Visible = true
    for emote in emoteDisplayButtons do
        emote.MouseButton1Click:Connect(function()
            print(emote.Name + "Button clicked")
            emoteDisplay.Visible = false
        end)
    end
end)
Source Link

My GUI TextButton isn't working

So I want to create a GUI where when I click a button an emote display pops up and when I click an emote it closes, now my display won't even show when the button is clicked. This is my code, can anyone help me?

""" local button = game.StarterGui.ScreenGui.EmoteButton.TextButton local emoteDisplay = game.StarterGui.ScreenGui.EmoteDisplay local emoteDisplayButtons = emoteDisplay.Emotes:GetChildren()

button.MouseButton1Click:Connect(function() print("Emote Button clicked.") emoteDisplay.Visible = true for emote in emoteDisplayButtons do emote.MouseButton1Click:Connect(function() print(emote.Name + "Button clicked") emoteDisplay.Visible = false end) end end) """