Ok so, I have 3 scripts I need to know how I could send the parameter to the module script from a local script.
Local Script This has to remain a local script because I have a lostfocus() event in it. I would like to be able to use something like this
local SavedValues = require(game.ReplicatedStorage.Get)(Player)
I want to receive a table from the name of the player. This Player is NOT the local player.
Module Script 1 (Get Table) I need to have something like this but this will not work because I don't know how to send it the parameter "Player"
local SavedValues
function GetStore(Player)
local DataStore = game:GetService("DataStoreService"):GetDataStore("ApplicationTest")
local Key = "Player-"..Player.userId
SavedValues = DataStore:GetAsync(Key)
if not SavedValues then
SavedValues = "None"
end
end
GetStore()
return SavedValues
Module Script 2 I don't need this to return anything I just need it to save.
local function SaveStore(Key,SavedValues)
local DataStore = game:GetService("DataStoreService"):GetDataStore("ApplicationTest")
DataStore:SetAsync(Key, SavedValues)
end

7 comments
This appears to be a request.
I need to know how I could send the parameter to the module script from a local script.
if you call something in a module from a localscript you can use local things like game.Players.LocalPlayer in the module script
It says cant call datastore from client
The error tells the truth, you can't use datastore with a LocalScript, you'd have to use RemoteEvents or RemoteFunctions instead
Ok
i dont think you can send anything to a module script from a local script...