If you can please explain the "(a table value)" part for me pleas
-- Variables
local xp_lvl_DataStore = game:GetService('DataStoreService'):GetDataStore('xp/lvlStore')
local repStorage = game:GetService('ReplicatedStorage')
local serverScriptStore = game:GetService('ServerScriptService')
local xpChanger = repStorage:WaitForChild('Xp_LvlChanged')
local xpToAdd = 5
local part = script.Parent
local maxLvl = 350
local xp_LvlModule = require (serverScriptStore.Xp_LvlModule)
-- Events
local success,message = pcall (part.ClickDetector.MouseClick:Connect(function(plr)
local key = 'Player-'..plr.UserId
local xpLvlTable = xp_lvl_DataStore:GetAsync(key)
-- Fire to player
xpChanger:FireClient(plr,xpToAdd)
-- Sends added xp then saves
xp_LvlModule(xpToAdd,key)
print('Xp: '..xpLvlTable[1]..' Lvl: '..xpLvlTable[2])
end))
It errors on line 18

1 comment
Why say thank you and not accept the answer? Accept it.