Getting Table from Module Script

In datastore there is a table of players, but its not getting it.

local Datastore =require(game.ServerScriptService["Data / Important"].Datastore) 

local event = game.ReplicatedStorage:FindFirstChild("Events"):FindFirstChild("Gameloaded")
local Players = game:GetService("Players")



event.OnServerEvent:Connect(function(Player)
	local profilesStore = Datastore["Profiles"]
	local profile = profilesStore[Player]
	if profile ~= nil then
	

	
		if Player:IsDescendantOf(Players) == true then
			if profile.Data.Tutorial == false then
				
			--do something
		
			
			
		end
	
	
		
	end
	
		
	
	end
	end)


1 Like

This script looks fine. The problem is likely elsewhere.

Does the profile store have player inside of the table?

Also if not wrong, you’re indexing an instance. Inside of the module table, did you put in player’s username/userid or just the player instance?

The problem here is that I am getting an error stating that the table “Profiles” is not a member of the “Datastore” Module, Event tho inside of the module there is a table by the name of Profiles

Can i get a screenshot of that?