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)