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

Making Text Label Invisible Not Working?

I try to remove a text label specifically only for me but no anyone else.

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local GuiClone = script.OverheadGui:Clone()
		GuiClone.Parent = Character.Head

		local UpperText = GuiClone.UpperText
		local MiddleText = GuiClone.MiddleText
		local LowerText = GuiClone.LowerText
		local Background = GuiClone.Background

		if Player.Name == "TechModel" then
			MiddleText.Visible = false
		end
	end)
end)

And the text label does not disappear and I'm not sure why. I want my MiddleText to not show up for my Gui above my head.' Thank you.

2 comments

0

There's a Visible property, so you can just set the TextLabel.Visible to true or false

0

And if you write the code in a LocalScript, it will only run on the client, and other playyers wont see it

1 answer

✓ Accepted answer
game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		if Player.Name == "TechModel" then
			local GuiClone = script.OverheadGui:Clone()
			GuiClone.Parent = Character.Head
		end
	end)
end)

This code only puts the Gui in the player's character if it's you, no need to make it invisible (make sure it's in a server script)

Let me know if I helped

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