So I have been trying to make it so a user has the same numberplate everytime they join the server. I have done the datastore etc but now I just need to make it so the numberplate actually gets put into a value corrently.

game.Players.PlayerAdded:connect(function(player)
	
	wait(5)
	
	if player.NumPlate.Value == "" then
		local patternz = "LLNN LLL"
		local platez = ""

		for i = 1, #patternz do
			local c = string.sub(patternz, i, i)
			if (c == "N") then
				platez = platez..tostring(math.random(0,9))
			elseif (c == "L") then
				platez = platez..string.char(math.random(65,90))
			else
				platez = platez..c
				player.NumPlate.Value = platez
			end
		end
	end
end)

"NumPlate" Is a value in player already created. It should do it in the format "LLNN LLL" L = letter | N = Number. So far it only does "LLNN ", I have tested it in a block and it works but not when its changing a value in a player.