I made a Profile Gui which allows players to veiw their stats (Levels, Exp, Coins, etc,) and I made this script:
local cash = script.Parent.Parent.Parent.Parent.Parent.leaderstats:WaitForChild("Coins") function changed() script.Parent.Text = "Coins: "..cash.Value end cash.Changed:connect(changed)
Everything worked fine in studio and in game. I tested it out with a couple of my friends and it was all working for them. But once we all reset the script no longer showed the stats. Is there something I did wrong? (The script above is for the Coins Stat.)
There you go, this version will work. Just change the location of the textlabel.
local plr = game.Players.LocalPlayer local cash = plr.leaderstats:WaitForChild("Cash") local textLabel = idkwherethetextlabelis textLabel.Text = "Coins: "..cash.Value cash.Changed:Connect(function() textLabel.Text = "Coins: "..cash.Value end)