I'm not sure why this is proving so difficult, but I have a leaderstats script that works as well as an overhead gui script which works. I would like to change the overhead gui text, based on the leaderstat value of the player ie - a title/rank system. Could I not just add an "if" statement at line 3 that checks for the players leaderstats.Money.Value? Something that would end like Money.Value >= 2000 then...? Thanks. This has been my Achilles Heel lately.
game.Players.PlayerAdded:Connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
local gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(3,0,4,0)
gui.StudsOffset=Vector3.new(0,1,0)
local name=Instance.new("TextLabel")
name.Parent = gui
name.BackgroundTransparency = 1
name.Text = "Noob"
name.Size = UDim2.new(1,0,1,0)
name.Position=UDim2.new(0,0,-0.41,0)
name.TextColor3=Color3.new(255,255,255)
name.FontSize = "Size18"
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:Connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:Connect(onPlayerEntered)

2 comments
You should be using local functions, and instead of changed simply wait for the character.
Ok, I will change to CharacterAdded