Doesn't update text

Hello! I want to update the text everytime you win but it doesn’t update or even print. I need help!

local plr = game.Players.LocalPlayer

local MoneyFolder = workspace:WaitForChild("Money"):GetChildren()

while true do
	for i, v in pairs(MoneyFolder) do
		if v:IsA("Part") then
			local UpdateMoney = v.Money.Value + plr:WaitForChild("leaderstats"):WaitForChild("MoneyConfig").MoneyMP.Value
			print("Founded")
			v.BillboardGui.TextLabel.Text = "💸 +"..UpdateMoney.." Money"
			print("Updating...")
		end
		
	end
	
wait(5)

	
end


1 Like

You are storing the children of Money outside of the loop. Try replacing MoneyFolder with workspace:WaitForChild("Money"):GetChildren()

1 Like

Alright, loops is starting now! Tysm, I just have an error but, I can fix it.

Also, why do we need to store it inside the loop and not outside? Genuine question

i guess so that it gets the latest amount of money

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.