Money GUI not updating

I am tryingto use a TextLabel to display the player’s multiplier, using the Rebirth leaderstat, and I have been looking at a few devforum and youtube posts/tutorials and none of the scripts mentioned are working.

I have tried about 7 different scripts neither of which worked.

Current script:

local money = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")

local text = script.Parent
local function update()
	text.Text = "$" .. money.Value
end

update()
money.Changed:Connect(update)

image
image

Thank you for any help in advance.

1 Like

Try:

money.Changed:Connect(function()
    update()
end)
2 Likes

try this

local money = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")
local text = script.Parent
money.Changed:Connect(function(Value)
	text.Text = "$"..Value
end

text.Text = "$"..money.Value
2 Likes

I tried it, That did not work for me

1 Like

That did not change the text of the label

1 Like

are you sure that you are defining the money value right?

I don’t know. I have tried about 7 different scripts and followed their instructions and neither worked.

I kind of updated the script so there shouldnt be a space inbetween the this:
text.Text = "$" ..Value
change to
text.Text = "$"..Value

i just realize you can put a space inbetween…
wait i updated it

That also did not update the text

just change it to:
text.Text = "$"..Value



Both of these did not work

You have to define the player try this:

local player = game.Players.LocalPlayer
local money = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")
local text = script.Parent
money.Changed:Connect(function(Value)
	text.Text = "$"..Value
end

text.Text = "$"..money.Value

Still, nothing is updating on the label

Is it a local script and is it active?


Yes it is a local script

Try this:

local player = game.Players.LocalPlayer
local money = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")
money.Changed:Connect(function(Value)
	print("$"..Value)
end)

print("$"..money.Value)
-- Services
local Players = game:GetService("Players")

-- Player Instance
local Player = Players.LocalPlayer

-- Leaderstats
local Money = player:WaitForChild("leaderstats"):WaitForChild("Rebirth")

-- Text
local TextLabel = script.Parent

local function Update()
   TextLabel.Text = "$"..Money.Value
end

Money.Changed:Connect(Update)

Update()

Try this and let me know if it works!


That printed correctly

The textlabel is still empty with this

Can you show us the leaderstats in game, in the player?