So when a player joins, he should have a gui over his head displaying his wins. Some people have it, and some don't. Please help.
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if char:FindFirstChild("Head") and player then
local clone = script.BillboardGui:Clone()
clone.Parent = char:FindFirstChild("Head")
clone.TextLabel.Text = (player:WaitForChild("leaderstats"):WaitForChild("Wins").Value)
clone.TextLabel.TextColor3 = Color3.fromRGB(255, 242, 208)
player:WaitForChild("leaderstats"):WaitForChild("Wins"):GetPropertyChangedSignal("Value"):Connect(function()
clone.TextLabel.Text = (player:WaitForChild("leaderstats"):WaitForChild("Wins").Value)
end)
end
end)
end)

2 comments
Where is this placed and what type of script is it
It's a server script and its in workspace