Value in text gui

local player = game.Players.LocalPlayer
local moneyB = 1

player:WaitForChild("leaderstats").Money.Changed:Connect(function()
	if player.leaderstats.Money.Value > moneyB then
		repeat
			moneyB = moneyB + 1
			wait(0.1)
		until player.leaderstats.Money.Value == moneyB
	end
	script.Parent.TextLabel.Text = "$"..moneyB.Value
end)

image

How can i fix it? i really dk why it’s don’t work

Try using GetPropertyChangedSignal() instead of what you are doing there.

How? Idk how to use it GetPropertyChangedSignal()

what’s even the point of this?

just do

local function GetChanged(Val) 
repeat
moneyB += 1 
script.Parent.TextLabel.Text = moneyB
wait(.1) 
until moneyB == Val.Value
return true
end

GetChanged(player:WaitForChild("leaderstats").Money) --// this is because when the player load their stats
--//
player:WaitForChild("leaderstats").Money:GetPropertyChangedSignal("Value"):Connect(function()
GetChanged(player:WaitForChild("leaderstats").Money) 
--[[
script.Parent.TextLabel.Text = "$"..player:WaitForChild("leaderstats").Money.Value
]]
end)

I want to make a nice money making effect. (as in gta: sa or gta5)

Okay but you didn’t mention anything in the OP about effect.

Sorry :frowning:
i think this part don’t works script.Parent.TextLabel.Text = "$"..moneyB.Value

@RodionPro100 click to the replied post I already gave you solution.

it isn’t works. I tried to do it

Can you tell me what is not working? Can you please send me screenshot of the output if there is any error? Is it in a local script?

yes it is local script. I can’t see any errors

Can you please send me the current state of your local script? :slight_smile:

local player = game.Players.LocalPlayer

local moneyB = 1

if player.leaderstats.Money.Value > moneyB then

repeat

moneyB = moneyB + 1

wait(0.1)

until player.leaderstats.Money.Value == moneyB

end

script.Parent.TextLabel.Text = "$"..moneyB.Value

This is not the script I gave you…

Oh. But i need effect then money +1

Try it now I edited it with the effect you wanted.