Player "stealing" rank overhead ui?

Alright, so on my game, I made a rank overhead UI. Lets say I am a Co-Owner and another Co-Owner joins, the Co-Owner that has just joined basically steals the other Co-Owners tag. When the other Co-Owner refreshes, they take the new Co-Owners tag? It is very strange and I am not sure how to fix this issue?

Script:

local TweenService = game:GetService("TweenService")

local groupid = 13240359
local clone = script.Overhead:Clone()

game.StarterPlayer.NameDisplayDistance = 0 
game.StarterPlayer.HealthDisplayDistance = 0

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if plr:GetRankInGroup(groupid) >= 253  then
		if plr.DisplayName == plr.Name then
			clone.Username.Text = plr.Name
		else
			clone.Username.Text = plr.Name.. " (@" ..plr.DisplayName..")"
			clone.Role.Text = plr:GetRoleInGroup(groupid)
			clone.Parent = char:FindFirstChild("Head")
			
				if plr:GetRankInGroup(groupid) >= 253 then
					while true do
						local Color = Color3.new(math.random(), math.random(), math.random())
						local ColorTween = TweenService:Create(clone.Username, TweenInfo.new(0.1), {TextColor3 = Color})
						ColorTween:Play()
						wait(0.5)

						end
					end
				end
			end
		end)
	end)

I think you should use the Clone function inside the event [characteradded]

Also, you should use task.wait instead of wait.

Don’t clone it here, reason:
it’d only clone it once when it’s like this.
Clone it inside the characteradded event, within your other checks.[clone and parent it into the player only if they dont have one already].

1 Like