To keep it simple, this script I made shows the characters level above their head. And yes I know I've set it to update every time the player dies because thats how I want it to work. But the thing is, say a player is level 3 and another 2 players are level 1. When those two players die they both show level 3 above their heads. It's pretty much taking the highest players level and showing it above everyone.
Is there any simple way around this?
Thanks in advance for help!
function CharacterRemoving(newPlayer)
wait(1)
while true do
wait(0.1)
if xp.Value >= 100 then
levels.Value = levels.Value + 1
xp.Value = 0
end
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(3,0,2,0)
gui.StudsOffset=Vector3.new(0,2,0)
text=Instance.new("TextLabel")
text.Text = "Level " .. levels.Value
text.Size=UDim2.new(1.25,0,0.5,0)
text.Position=UDim2.new(-0.125,0,-0.25,0)
text.BackgroundTransparency = 1
text.Parent=gui
text.FontSize = ("Size36")
text.Font = ("ArialBold")
text.TextColor3 = Color3.new(255, 255, 0)
text.TextStrokeColor3 = Color3.new(0, 0, 0)
text.TextStrokeTransparency = 0
w = game.Lighting.WepsGroup:GetChildren()
for i = 1,#w do
w[i]:Clone().Parent = newPlayer.Backpack
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
CharacterRemoving(newPlayer)

2 comments
Replied. I would reply faster, but for some reason, I'm not getting a notification from this question, when you comment.
Thats alright, but yeah i've tried removing the while loop I really can't figure out the cause. I would post the whole script so people could look further into it but its 124 lines long and would probably be classed as spam.