My datastore is not working and I have no idea what's wrong

To anyone else who reads this, make sure this is done in studio when using PlayerAdded:

local function playerAdded(player)
	--PlayerAdded stuff
end
for _,player in pairs(players:GetPlayers()) do
	local co = coroutine.wrap(function() playerAdded(player) end)
	co()
end

players.PlayerAdded:Connect(playerAdded)

Sometimes the player is added before the PlayerAdded event listener is set up. This way if a player is already in the game by the time the for loop runs, then it’ll get the player(s) and connect to the playerAdded function. It won’t fire for the PlayerAdded event because the player was already added. If the player doesn’t join before the event is set up, then :GetPlayers() will return nil and the for loop won’t run at all…in that case the event will be set up before the player is added.

Mind you, this only needs to be done in Studio …there’s no way for a player to join before the server is ready in a live game unless something very wrong is done.