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.