I'm trying to fire a remote event (from the client), and I want it to return the first value of the table I have saved in a datastore, but it thinks 'slot' is the player, when it is not.
LocalScript:
wait(2)
script.Parent.CharName.Text = game.Lighting.Remotes.ClientToServer.GetCharName:FireServer({"1"}, game.Players.LocalPlayer, game.Players.LocalPlayer.Char)
ServerScript:
game.Lighting.Remotes.ClientToServer.GetCharName.OnServerEvent:connect(function(slot, plr, charf)
local ds = game:GetService("DataStoreService"):GetDataStore("datastore["..slot[1].."]"..plr.UserId)
local key = "rpg"..plr.UserId
local vals = ds:GetAsync(key)
print(vals)
print(vals[1])
return vals[1]
end)
I'm just super confused. Thanks if you could help!

1 comment
Thank you!