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