Help weird BillboardGUI above head [Video + Script]

  1. What do you want to achieve? Hello, I have a problem with a BillBoardGui with text labels inside, the problem appears only on mobile. Please watch the video to understand what happens in certain camera positions. I don’t understand where this problem comes from, I tried a lot of things in the BillBoardGUI and text labels settings, nothing seems to work. Thanks

  2. What is the issue?

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		wait(2)
		local rep = game:GetService("ServerStorage")
		local nametag = rep:WaitForChild("NameTag"):Clone()
		local head = char.Head
		nametag.Parent = head
		nametag.Adornee = head
		local uppertext = nametag.UpperText
		local secondtext = nametag.SecondText
		local Simpsons = Instance.new("IntValue")
		Simpsons.Value = #plr:WaitForChild("Creatures"):GetChildren()
		plr:WaitForChild("leaderstats"):FindFirstChild("Simpsons").Value = #plr:WaitForChild("Creatures"):GetChildren()
		uppertext.Text = Simpsons.Value
		if uppertext.Text == "134" then 
			uppertext.TextColor3 = Color3.fromRGB(76, 157, 255)
			secondtext.TextColor3 = Color3.fromRGB(76, 157, 255)
		end
	end)
end)
1 Like

wheres the code that updates the contents of the GUI

1 Like
game.ReplicatedStorage:WaitForChild("Nametag").OnServerEvent:Connect(function(plr, data)
	if not plr:WaitForChild("Creatures"):FindFirstChild(data) then
		local newval = Instance.new("BoolValue")
		newval.Name = data
		newval.Parent = plr:WaitForChild("Creatures")
		plr:WaitForChild("leaderstats"):FindFirstChild("Simpsons").Value = #plr:WaitForChild("Creatures"):GetChildren()
		plr.Character.Head.NameTag.UpperText.Text = plr:WaitForChild("leaderstats"):FindFirstChild("Simpsons").Value
		if plr.Character.Head.NameTag.UpperText.Text == "134" then
			plr.Character.Head.NameTag.UpperText.TextColor3 = Color3.fromRGB(76, 157, 255)
			plr.Character.Head.NameTag.SecondText.TextColor3 = Color3.fromRGB(76, 157, 255)
		end
	end		
end)
1 Like

and the code that fires that event

1 Like

There was no event in the video, the problem is totally independent

1 Like

“on server event” means the code is being run by an event from another script

1 Like

Yea but this part of script not cause any problem. The problem appears even if the event has never been used

1 Like

it could just be a roblox problem if its only happening on phone

1 Like

I think it’s related to something that is on the map, because in the previous update this bug doesn’t appear but now it appears while none of the scripts have been modified … I don’t know it’s pretty weird and it prevents me from updating my game

1 Like

Hello i still have this weird issue with nametag. I noticed some other game with same bug on mobile. Please help

none of you have ever encountered this problem when creating a game?

Make it one label, and concatenate the string. Might make it less laggy, and there is no reason to have two.

I just tried it and it doesn’t change the problem. This is not related to a lag problem, my game is well optimized and has little latency. It seems to be related to I don’t know what, maybe textures or GUI surfaces or the sky, or maybe some meshs I don’t really know I tried so many things. I never had this problem before updating my game, it’s not related to the script because even if I delete all the scripts in my game the problem persists

What are the properties of the billboard gui?

actually

But I tried everything with, literally, it seems to be a roblox bug, not optimized for mobile players, because this bug does not appear on computer. Somethings on the map seem to provoke that

Hi i still didn’t find any solution if maybe someone know how to fix this bad bug… thank you

I geuss you can do it with one text label, if you wanted to.

game.ReplicatedStorage:WaitForChild(“Nametag”).OnServerEvent:Connect(function(plr, data)
if not plr:WaitForChild(“Creatures”):FindFirstChild(data) then
local newval = Instance.new(“BoolValue”)
newval.Name = data
newval.Parent = plr:WaitForChild(“Creatures”)
plr:WaitForChild(“leaderstats”):FindFirstChild(“Simpsons”).Value = #plr:WaitForChild(“Creatures”):GetChildren()

	local creatureCount = plr:WaitForChild("leaderstats"):FindFirstChild("Simpsons").Value
	local displayText = string.format("<font color='%s'>%d</font>/134", creatureCount == 134 and "rgb(76, 157, 255)" or "rgb(255, 255, 255)", creatureCount)
	plr.Character.Head.NameTag.TextLabel.Text = displayText

	if creatureCount == 134 then
		plr.Character.Head.NameTag.TextLabel.TextColor3 = Color3.fromRGB(76, 157, 255)
	else
		plr.Character.Head.NameTag.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	end
end		

end)

game.Players.PlayerAdded:Connect(function(plr)
local billboardgui = script:WaitForChild(‘NameTag’):Clone() --relocate this to anywhere
repeat wait() until plr.Character
billboardgui.Parent=plr.Character:WaitForChild(‘Head’)
local leaderstats = Instance.new(‘Configuration’, plr)
leaderstats.Name = ‘leaderstats’
local simpsons = Instance.new(‘IntValue’, leaderstats)
simpsons.Value = 0 --or the datastore thing, you can change this
simpsons.Name = ‘Simpsons’
local creatures = Instance.new(‘Folder’, plr)
creatures.Name = ‘Creatures’
end)

You can try this, if you didn’t fix it yet.

Used your script -the local Simpsons. Made the NameTag and Texts by the script names… Added the numbers in manually, then dropped it in Server Storage… Worked fine. Flicker isn’t coming from this, I would guess. I left everthing default but, checked Always on top and set StudsOffset 0,3,0.

Apparently it has something to do with the way Roblox manages a phone/tablet’s memory. If Roblox needs to cut down on memory, it will lower the quality of some aspects of your game, the TextLabel text rendering might be one of them. So i remplaced every text labels in my map with decals. This post was 2 years ago lol

Hmm. didn’t test that on a phone. Glad that worked and I’ll keep that in mind.

1 Like