Hello Fellow Scripters! Today I need help on making a text label in a BillboardGUI not visible. This script is in the serverscriptservice. My problem is that if your name == a Owner than the guest text label needs to be invisible but it’s not turning invisible. I have no errors (according to the Developer Console). Thanks!
--// Varibles \\--
local head = char.Head
local newtext = nametag:Clone()
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
local guesttext = newtext.Guest
humanoid.DisplayDistanceType = "None"
--// Main Text \\--
newtext.Parent = head
newtext.Adornee = head
--// Owner \\--
if player.Name == "AmphibionplayzDev" then
lowertext.Text = "Owner"
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0)
guesttext.Visible = false
end
When you’re comparing strings, it’s going to be case specific. This means that you have to capitalize the letter P in “Playz” when you’re comparing your player’s Name.
However, I would advise using UserId instead as that can never change for each player.
i will try that i changed the code but i didn’t work
--// Varibles \\--
local head = char.Head
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
local guesttext = newtext.Guest
humanoid.DisplayDistanceType = "None"
--// Main Text \\--`
newtext.Parent = head
newtext.Adornee = head
--// Changes To Player's Name \\--
uppertext.Text = player.Name
--// Owner \\--
if player.UserId == "2453219029" then
lowertext.Text = "Owner"
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0)
--// Color Of Rank \\--
guesttext.Visible = false
end
--// Varibles \\--
local head = char.Head
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
local guesttext = newtext.Guest
humanoid.DisplayDistanceType = "None"
--// Main Text \\--
newtext.Parent = head
newtext.Adornee = head
--// Changes To Player's Name \\--
uppertext.Text = player.Name
--// Owner \\--
if player.UserId == 1260127860 then
lowertext.Text = "Owner"
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0)
--// Color Of Rank \\--
guesttext.Visible = false
end
--// Varibles \\--
local head = char.Head
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
local guesttext = newtext.Guest
humanoid.DisplayDistanceType = "None"
--// Main Text \\--`
newtext.Parent = head
newtext.Adornee = head
--// Changes To Player's Name \\--
uppertext.Text = player.Name
--// Owner \\--
if player.UserId == 2453219029 then
lowertext.Text = "Owner"
lowertext.TextColor3 = Color3.fromRGB(255, 51, 0)
--// Color Of Rank \\--
guesttext.Visible = false
end
I’m not sure what would be causing the other text to disappear unless there’s more code below what was shown that could be modifying the other GuiObjects – the condition that would be met is only changing the visibility of the guesttext, which shouldn’t impact the other text.
In case it wasn’t set by default, you can reference the other text objects and ensure that their Visible property is set to true.
Hi Guys, so i figured out the issue somehow an extra 0 got added to the end of the id but since @ StrongBigeMan9 helped me with the strings it would’ve worked!