Need help with storing and taking value from datastore

I am new to data storing and I got a problem. I’ve made 2 scripts for this, one is a server script parented to ServerScriptService and a LocalScript parented to a surfacegui on part. The server script is used to make folders and values inside of the local player and also saving those string and number values to DataStoreService. Then the LocalScript will take those values from the datastore and changes the textlabel’s text which is also parented to the surfacegui. I want it so that the player can only see their own stats on the surfacegui and not other people’s stats. The server script works fine with no error but the localscript just doesn’t get the values (nil). I think the data storing just doesn’t work right and it saves nothing to the datastore. I’ve also tried the assistant to help me with this but nothing helped so far.

Server script
game.Players.PlayerAdded:Connect(function(plr)

	-- Main Folder
	local folder = Instance.new("Folder", plr)
	folder.Name  = "Database"
	
	
	-- Category Folders
	local ClientData   = Instance.new("Folder", folder)
	ClientData.Name    = "ClientData"
	local ServerData   = Instance.new("Folder", folder)
	ServerData.Name    = "ServerData"
	local PaperData	   = Instance.new("Folder", folder)
	PaperData.Name	   = "PaperData"
	
	-- Client Values
	local Currency = Instance.new("NumberValue", ClientData)
	Currency.Name  = "Currency"
	local Damage   = Instance.new("NumberValue", ClientData)
	Damage.Name    = "Damage"
	local Defense  = Instance.new("NumberValue", ClientData)
	Defense.Name   = "Defense"
	local Health   = Instance.new("NumberValue", ClientData)
	Health.Name    = "Health"
	local Stamina  = Instance.new("NumberValue", ClientData)
	Stamina.Name   = "Stamina"
	local Breath   = Instance.new("NumberValue", ClientData)
	Breath.Name    = "Breath"
	local Level    = Instance.new("NumberValue", ClientData)
	Level.Name     = "Level"
	local XP       = Instance.new("NumberValue", ClientData)
	XP.Name        = "XP"
	local IsBanned = Instance.new("BoolValue", ClientData)
	IsBanned.Name  = "IsBanned"
	
	
	-- Server Values
	local Biome    = Instance.new("StringValue", ServerData)
	Biome.Name     = "Biome"
	local Island   = Instance.new("StringValue", ServerData)
	Island.Name    = "Island"
	
	
	-- PaperData Values
	local PlayerName	= Instance.new("StringValue", PaperData)
	PlayerName.Name		= "PlayerName"
	local Rank			= Instance.new("StringValue", PaperData)
	Rank.Name			= "Rank"
	local TotalTime		= Instance.new("NumberValue", PaperData)
	TotalTime.Name		= "TotalTime"
	local TotalKill		= Instance.new("NumberValue", PaperData)
	TotalKill.Name		= "TotalKill"
	local DateJoined	= Instance.new("StringValue", PaperData)
	DateJoined.Name		= "DateJoined"
	

	
	----------- Saving datas -----------
	local DataStoreService		= game:GetService("DataStoreService")
	local DateJoinedDS_KEY		= "DateJoined"
	local PlayerNameDS_KEY		= "PlayerName"
	local IsBannedDS_KEY		= "IsBanned"
	
	-- DateJoined Value --
	local currentDate			= os.date("%b %d, %Y")
	DateJoined.Value			= currentDate	
	local datejoinedDataStore	= DataStoreService:GetDataStore("DateJoinedDataStore")
	datejoinedDataStore:SetAsync(DateJoinedDS_KEY, currentDate)
	
	-- PlayerName Value --
	local playername			= plr.Name
	PlayerName.Value			= playername
	local playernameDataStore	= DataStoreService:GetDataStore("PlayerNameDataStore")
	playernameDataStore:SetAsync(PlayerNameDS_KEY, playername)
	
	-- IsBanned Value --
	IsBanned.Value				= false
	local isbannedDataStore		= DataStoreService:GetDataStore("IsBannedDataStore")
	isbannedDataStore:SetAsync(IsBannedDS_KEY, IsBanned.Value)
	
	
	
end)
Local script
game.Players.PlayerAdded:Connect(function(plr)
	local DateJoined = script.Parent:WaitForChild("Changeable"):WaitForChild("PlayerDateJoined")
	local PlayerName = script.Parent:WaitForChild("Changeable"):WaitForChild("PlayerName")
	local Rank		 = script.Parent:WaitForChild("Changeable"):WaitForChild("PlayerRank")
	local TotalTime	 = script.Parent:WaitForChild("Changeable"):WaitForChild("PlayerTotalTime")
	local TotalKill	 = script.Parent:WaitForChild("Changeable"):WaitForChild("PlayerTotalKill")
	
	local DataStoreService		= game:GetService("DataStoreService")
	
	local datejoinedDataStore	= DataStoreService:GetDataStore("DateJoinedDataStore")
	local playernameDataStore	= DataStoreService:GetDataStore("PlayerNameDataStore")
	
	local success, value= pcall(function()
		return datejoinedDataStore:GetAsync("DateJoined")
	end)
	
	if success then
		print(value)
		DateJoined.Text = tostring(value)
	else
		print("Error retrieving value")
	end
end)

I’m not sure what causes this to not work because it also doesn’t give me any error outputs or print outputs. Anything helps! Cheers

You can’t access the data store from a client. You’ll have to use a remote function to get the value.