Having an issue with 'Text label test'

What im trying to achieve is to make the text not visible.

Script :

script.Parent.MouseButton1Click:Connect(function()
    	game.Players.PlayerAdded:Connect(function(plr)
    		plr.CharacterAdded:Connect(function(char)
    			if char.Head:FindFirstChild("RankGui") then
    				
    					char.Head:FindFirstChild("RankGui").TextLabel.Text = " "
    					
    				
    			end
    		end)
    			
    		end)
    end)

I know that it only makes the text to space or blank.

All you need to do is this:

local rankgui = char.Head:FindFirstChild("RankGui")
local text = rankgui.TextLabel
text.Visible = false

or you could do:

local rankgui = char.Head:FindFirstChild("RankGui")
rankgui.Enabled = false

Still not as i dont mention its Local script and i want is once i touch the button it makes my Head name not visible

If you use TextLabel you can change the Text Transparency (to display or not display text)

1 Like

Well if you want it when you touch a button, I’ll add that in. Next time please put more detail in the text.

local button = workspace:WaitForChild("Button")
button.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local rankgui = char.Head:FindFirstChild("RankGui")
local text = rankgui.TextLabel
text.Visible = false
end
end)

Try this:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

script.Parent.MouseButton1Click:Connect(function()
	if Character.Head:FindFirstChild("RankGui") then
		Character.Head.RankGui.TextLabel.Visible = false
	end
end)
1 Like

Thats what im looking for @Ti4rin

Nice to hear! Also, could you mark it as the solution so?

I already mark it as a solution!