Everytime the value of the bank "cash" i suppose, then it updates, but what i've done here is when i hover over the text, it shows the abbreviation value, full value if not hovered over. However if the value changes, while mouse enters the text with abbreviation on, then it updates back to full value. How do I fix this issue? I know why but I tried mouseentered == true and I don't think it sounds the right way to do it?

local player = game.Players.LocalPlayer

script.Parent.Text = player.stats.Bank.Value

player.stats.Bank:GetPropertyChangedSignal("Value"):Connect(function()
	script.Parent.Text = player.stats.Bank.Value
end)

script.Parent.MouseEnter:Connect(function()

	local player = game.Players.LocalPlayer
	script.Parent.Text = abbreviateNums(player.stats.Bank.Value)
end)

script.Parent.MouseLeave:Connect(function()

	local player = game.Players.LocalPlayer
	script.Parent.Text = player.stats.Bank.Value
end)

1 comment

0

it is the right way to do it :/