Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Data store not saving the correct value help?

So I'm trying to make it save the text of the gui and it won't save, It just keeps loading "TextBounds"

Filtering enabled is on and it's in Workspace

local SetBackData = {}

MoneyStore = game:GetService("DataStoreService"):GetDataStore("DataStore")

function PlayerEntered(player)
	repeat wait() until player.Character
	if MoneyStore:GetAsync("Money_"..player.Name) ~= nil then
		game.Players[player.Name].PlayerGui.MoneyDisplay.Money.TextLabel.Text = MoneyStore:GetAsync("Money_"..player.Name)
	else
		game.Players[player.Name].PlayerGui.MoneyDisplay.Money.TextLabel.Text = "1500"
		print("New money value")
	end
	
	
--timleft = 0
	game.Players[player.Name].PlayerGui.MoneyDisplay.Money.TextLabel.Changed:connect(function(Text)
		--if timleft <= 1 then
		wait(1)
		MoneyStore:SetAsync("Money_"..player.Name, Text)
		print("Saved")
			--timleft = 20
			--for i = 20, 1, -1 do
				--timleft = i
			--end
		--end
	end)
end

game.Players.PlayerAdded:connect(PlayerEntered)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.