Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How and why cash GUI script is not working and cant spot the error please help me, please?

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)

1 comment

0

sorry for not enough space to write the script well and please help me spot the error 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.