Cannot make a TextLabel Invisible

local button = script.Parent
local WelcomeText = game.StarterGui.IFE.Screen.WelcomeText
button.MouseButton1Click:Connect(function()
     print("Clicked!")
     WelcomeText.Visible = false
end)

This LocalScript is supposed to change the visible property of WelcomeText, however, it’s not working. Help?

1 Like

Quick Response


You are basically turning the object’s visiblity in StarterGui. You should use PlayerGui from game:GetService("Players").LocalPlayer.

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local button = script.Parent
local WelcomeText = LocalPlayer:WaitForChild("PlayerGui").IFE.Screen.WelcomeText
button.MouseButton1Click:Connect(function()
    WelcomeText.Visible = false
end)

Seriously, colbert2677?

3 Likes

Thanks for both of the solutions. I’ll keep those in mind.