Something Very Weird Happening

So i’m trying to replicate the player’s money to a UI, all is well until the player respawns.

It prints that the text on the wallet and bank textlabels are correctly updated, but looking at it in game shows that they aren’t and haven’t changed at all.

Server

--// Character Added
local charAdded = function(char)
	print("fired - character added")
	if char then
		local player = game.Players:GetPlayerFromCharacter(char)
		local saveInfo = profileHandler:GetProfile(player)
		print(saveInfo.Currency.Wallet, saveInfo.Currency.Bank)
		remotes.retrieveStats:FireClient(player, saveInfo)
	end
end

Client

retrieveStats.OnClientEvent:Connect(function(data)
	print("ran updater sheesh")
	print(data.Currency.Wallet, data.Currency.Bank)
	--// Currency \\--
	if data then
		walletLabel.Text = "$"..comma_sort(data.Currency.Wallet)
		bankLabel.Text = "$"..comma_sort(data.Currency.Bank)
		print(walletLabel.Text, bankLabel.Text)
	else
		error("no data received")
	end
end)

Is ResetOnSpawn property of the GUI turned on? If it is that means the GUI resets after the player dies. The Gui is deleted from the PlayerGui and copied from the StarterGui again if this is the case.

1 Like

I ended up turning off to test, I still get the same result for some reason. My other update function for when the value changes works perfectly. Yet, regardless of having the UI reset or not reset on spawn, it still does whatever it’s doing now.

It’ll print the text of wallet and bank textlabels, and those will be correct in the output.

Yet, looking at them in game, they only have the default $ sign which I have there as a placeholder.

Actually, excuse me.

My brain was flurried. Fixed it by turning RESETONSPAWN off and just not trying to set it because there is on need to!

Thanks for your help.