Help with overhead tag from gaining badge

So continuing from this topic I made - > How can I make my overhead gui check if a player has a badge and if so display "Early Tester" - #3 by Zentryte

I got it to work BUT it only works in the game not the place connected to the game
image

This is the scripts now V

local Players = game:GetService("Players")

local rankInformation = require(script.RankInformation)

local connections = {}
local overHeadTemplate = script.OverheadGui

Players.PlayerAdded:Connect(function (player)
	connections[player] = player.CharacterAdded:Connect(function (character)
		local newOverhead = overHeadTemplate:Clone()
		
		newOverhead.PlayerName.Text = player.Name
		
		for _, info in pairs (rankInformation) do
			local isPlayerInDivision = player:IsInGroup(info.groupId)
			
			if isPlayerInDivision then
				newOverhead.Group.Text = info.name
				newOverhead.Group.TextColor3 = info.color
				newOverhead.Group.Visible = true
				
				newOverhead.Rank.Text = player:GetRoleInGroup(info.groupId)
				newOverhead.Rank.Visible = true
			end
		end
		
		character:WaitForChild("Humanoid").DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		newOverhead.Parent = character:WaitForChild("HumanoidRootPart")
	end)
end)


local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")

local badgeID = 2124639978 -- Change this to your badge ID

local connections = {}
local overHeadTemplate = script.OverheadGui

local function onPlayerAdded(player)
	-- Check if the player has the badge
	local success, hasBadge = pcall(function()
		return BadgeService:UserHasBadgeAsync(player.UserId, badgeID)
	end)

	-- If there's an error, issue a warning and exit the function
	if not success then
		warn("Error while checking if player has badge!")
		return
	end

	if hasBadge then

		overHeadTemplate.Tester.Visible = true
	end
end

-- Connect "PlayerAdded" events to the "onPlayerAdded()" function
Players.PlayerAdded:Connect(onPlayerAdded)


Players.PlayerRemoving:Connect(function (player)
	if connections[player] then
		connections[player]:Disconnect()
		connections[player] = nil
	end
end)

image

As you can see when i play my testing game i have a badge from that game and it gives you the “early tester text”
image

But if I go in my game Im working on and select a map that brings you to another PLACE connected to the game it wont show it

1 Like

did you copy the scripts over to that game?

1 Like

i think your using a free model but lets just ignore that

TeleportService:Teleport() has a third parameter that allows you to send information to the place you want to teleport.

Try to send that you have the badge through the method, remember this is not a real solution, ill try find a better way to solve this.

Also as @qwertluk said, i need know that too.

2 Likes

I used this video for the over head gui-> Rank Overhead GUI - ROBLOX - YouTube

then i used this - > BadgeService:UserHasBadgeAsync

image

This is the final product and it is in serverscriptservice.
and yea I did I just copied the “OverheadGui” script with everything in it in the place.

PS I do not take any credit cause yea I used those turtorials