I was just curious, is is possible to store a boolean value in a datastore (Like true, or false). I wanted to check to see if a player was new but I don't know if it would be possible to do this with true or false. Thanks, below is my current loading script (does use gui's) kinda random but just something to show you guys so I don't get in trouble for not showing current projects:
----------------------------------------------------------------------------------------------------
--Insert VARIABLES Below
----------------------------------------------------------------------------------------------------
local DataStore = game:GetService("DataStoreService"):GetDataStore("Money")
local Player = script.Parent.Parent.Parent
repeat wait() until game.Players[Player.Name].PlayerGui.MainScreen
local info = script.Parent.Info
local loadinginfo = script.Parent.LoadingScreen.LoadingInfo
loadingstats = script.Parent.LoadingScreen.LoadingBar.LoadingStats
local statsloaded = script.Parent.StatsLoaded
----------------------------------------------------------------------------------------------------
info.Visible = false
if statsloaded.Value == false then
statsloaded.Value = true
repeat wait() until game.Players[Player.Name].PlayerGui.MainScreen
loadinginfo.Text = "Loading Player Stats"
local PlayerKey = "user_" .. Player.userId --// Never use the player's name as a key.
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
local money = game.Players[Player.Name].PlayerGui.MainScreen.Money
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
money.Value = DataStore:GetAsync(PlayerKey) --// Retrieving the value of the saved key.
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadinginfo.Text = "Loading Images"
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadinginfo.Text = "Finishing up"
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
wait(1)
loadingstats.Size = loadingstats.Size + UDim2.new(0.1,0,0,0)
loadinginfo.Text = "Stats and images loaded"
wait(2)
script.Parent.LoadingScreen:Destroy()
info.Visible = true
elseif statsloaded.Value == true then
info.Visible = true
end

1 comment
It stores booleans, thanks!