Obtaining data from a table

Hey!

This is my first time using datastores, and I am struggling a tad to get data from a table. I am creating a character system, there are three slots that people can use, once someone has made a slot, a new entry is made with their username and a table containing the following;

FirstName
LastName
Skintone

https://gyazo.com/45b9cd5ca5fff430b49270da22cfdc1d

This is the part of the script I am struggling with.

local success, setF = pcall(function ()
			return slot_one:GetAsync(plr.Name, "FirstName")
		end)
		if success then
			ui.TextLabel.F.Value = setF
		end

I am getting this error;
https://gyazo.com/13d6e4014dcd99de136e166d166b15f1

Any help would be greatly appreciated. :+1:

I highly suggest looking into using ProfileService for all of your data store needs. It is by far the easiest and most efficient way to store data — and it is beginner friendly. Better yet, it is super easy to store data tables. Look up a tutorial of ProfileService on YouTube, it is seriously worth learning.

Thank you! Honestly have never heard of this before. Much appreciated. :slight_smile:

1 Like