game.Players:WaitForChild(game.Players.LocalPlayer.Name):WaitForChild("leaderstats"):WaitForChild("Cash").Changed:connect(function() script.Parent.Text = game.Players:WaitForChild(game.Players.LocalPlayer.Name)WaitForChild("leaderstats"):WaitForChild("Cash").Value end)
COMMUNITY QUESTION
How and why cash GUI script is not working and cant spot the error please help me, please?
2 answers
I think it is like this:
while true do
Wait(0.1)
script.Parent.Text == game.Players.LocalPlayer:WaitForChild("leaderstats" ):WaitForChild("stat name")
end
Here is a little more complex version.
local Plr = game.Players.LocalPlayer --The Player
local Stats = Plr.leaderstats --The leaderstats
while Stats ~= nil do -- While Stats Is in the game
wait()
script.Parent.Text = "Cash: "..Stats.Cash.Value.."$"
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
sorry for not enough space to write the script well and please help me spot the error please