local player = game.Players.LocalPlayer local cash = player.leaderstats.Cash while true do wait() script.Parent.Text = "Cash: "..cash.Value end
Are there any mistakes or anything?
I put this script in the textlabel.
Using a loop is really bad because I once used too many loops and it crashed. I have been taught the .Changed:connect:function() method.
Make sure this is a local script in the text label;
local player = game.Players.LocalPlayer local cash = player:WaitForChild("leaderstats").cash local textlabel = script.Parent textlabel.Text = cash.Value --When player joins they need to see their cash cash.Changed:connect(function(Value) --FUNCTIONS WHEN CASH IS CHANGED textlabel.Text = cash.Value end)
If any other help is needed comment down below. Please upvote and accept answer if helped.