Certain scripts won't function on certain users

Hey! I have a small error that I can’t fix. It been happening with a couple of my scripts (GlobalLeaderboard, nametag) and seems to only work on certain accounts.

The Name Tag won’t show up on certain users. On my main account (OP account) it seems to work as intentional although going on alt accounts seem to not work. For my Name Tag if I were to go on alt accounts it would simply not show up.

I’ve tried asking fellow scripters who gone ahead and joined and tested and it seemed to work well for them, only a problem when it comes to the alt account I’m using.

Script

local players = game:GetService("Players")
local datastore = game:GetService("DataStoreService")
local NameTagColor = datastore:GetDataStore("NameTagColor")

local TweenService = game:GetService("TweenService")
--local MarketPlaceService = game:GetService("MarketplaceService")
local groupId = 7354329 --REPLACE THIS WITH YOUR GROUPID


game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local GuiClone = script.OverheadGui:Clone()
		local head = Character:WaitForChild("Head")
		GuiClone.Parent = head
		local DisplayNamez = GuiClone.WDisplayName
		GuiClone.Parent = head
		local RankName = GuiClone.XRankName
		GuiClone.Parent = head
		local RankText = GuiClone.YRankText
		GuiClone.Parent = head
		local LevelText = GuiClone.ZLevel
		GuiClone.Parent = head
		
		
		
		DisplayNamez.Text = Player.DisplayName
		
		GuiClone.Parent = head
		local PlayerRank = Player:GetRoleInGroup(groupId)

		local stats = Player:WaitForChild("hiddenleaderstats")
		local Level = stats:FindFirstChild("Level").Value
		
		RankText.Text = PlayerRank
		LevelText.Text = 'Level: ' .. Level
		
		local success, data = pcall(NameTagColor.GetAsync, NameTagColor, Player.UserId)
		if success then
			
			if not data then
				local data =  {1,1,1}
				NameTagColor:SetAsync(Player.UserId, data)
-- this part is omitted as it doesn't seem to be the problem
				print('Data Created')
			else
				local DataFromDatastore = NameTagColor:GetAsync(Player.UserId) --load from datastore
				NameTagColor:GetAsync(Player.UserId)
				local LoadedColor3 =  Color3.new(1,1,1) 
				print(LoadedColor3)
-- this part is omitted as it doesn't seem to be the problem
			end
		end
		GuiClone.Parent = head
	end)

end)

Any help is greatly appreciated!

I’ve also gone ahead and created a test game.
If that helps I can also join on my alt account.

Are you getting any errors when the issue occurs? What exactly happens when issue occurs? Does a certain text label not change or is the UI not cloned into the head at all?

1 Like

Thanks for the response! No errors whatsoever. As for if its cloning I’ve tried changing the text of the name tag through the console. Works with my main account but not my alt. I believe its not cloning to the head whatsoever. It’s also effecting my leaderboard script aswell on top of that.

Does it fix itself when you respawn? Or does the issue still occur?

1 Like

Issue still occurs even after I respawn.

Could this be the issue, or is this intended?

1 Like

This is intended. I’ve gone ahead and removed it to test to see if that was the issue, problem still occors.

1 Like

So the issue is the BillboardUI isn’t being cloned or possibly parented to the players head? Also why are you parenting the cloned UI to the head several times throughout the script?

1 Like

Sorry for the late response. Someone told me the issue lies in the parenting so I’ve gone ahead and parented it a few times to see if that would solve the issue.

It could be because your head is different. I know a game that uses the Head as the main point for all the attacks. If a user doesn’t have a default head(like bacon head) then it will break.

I’m not sure if the name is different or it’s just not there(the head).

1 Like

My scripts only wait for the head to load it so that wouldn’t seem to be the issue.

No it’s not that it won’t load. Its the fact that it could maybe be named something else.

1 Like

The script doesn’t modify the name, I’ve tried this in a separate game with that script only to confirm that other scripts aren’t messing it up.

Issue seems to be a core bug, An report has been sent.