I have been trying to do this for a couple of hours but it wont work, Here is my leader board script so far.
game.Players.PlayerAdded:connect(function(plr) local stats = Instance.new('IntValue', plr) stats.Name = 'leaderstats' local cash = Instance.new('IntValue', stats) cash.Name = 'Cash' cash.Value = 0 local c = game.StarterGui.Leaderboard.Frame.TextLabel wait() c.Text = "Cash: "..cash.Value end)
I need it so it is the players stats that he/she is looking at I want it as a text label after Cash:
Delete line 7,8 and 9 and make a local script in game.StarterGui.Leaderboard.Frame.TextLabel with this code:
local gui = script.Parent local cash = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Cash") while wait() do gui.Text = "Cash: "..cash.Value end