DataStore2 not Saving Values

The script works fine, it changes my players Gender value from None to whatever I click (Male, Female)
Then when I rejoin the game it brings up the GUI again, because the value isn’t saving (Male, Female)
It keeps making the value “None”
Any idea how to make it save Male or Female?

Here’s the script.

game.ReplicatedStorage.Remotes.GenderEvent.OnServerEvent:Connect(function(Player,Gender)
	if Player.Gender.Value == "None" or Player.Gender.Value == "" then
		Player.Gender.Value = Gender

		Player.FirstName.Value = randomname(Gender)
		Player:LoadCharacter()
	end
end)

Its changing the value to none because you literally put the text “none” in. To fix this just do this

game.ReplicatedStorage.Remotes.GenderEvent.OnServerEvent:Connect(function(Player,Gender)
	if Player.Gender.Value:match("^%s*$") then
		Player.Gender.Value = Gender

		Player.FirstName.Value = randomname(Gender)
		Player:LoadCharacter()
	end
end)

That should work