Here are my scripts:

Local Script:

local weaponData =	--The table
{
	ironPick = false,
	silverPick = false,
	goldPick = false,
	diamondPick = false
}

local remote1 = game.ReplicatedStorage.DataStore
local buyBtn = script.Parent:WaitForChild("ScreenGui").Frame.TextButton

buyBtn.MouseButton1Click:Connect(function()	--When the "Buy" Button is clicked we send the table to the Datastore server script

	remote1:FireServer(weaponData)

end)

Server Script:

local remote1 = game.ReplicatedStorage:WaitForChild("DataStore")
local ds = game:GetService("DataStoreService")
local ds1 = ds1:GetDataStore("pickData1Test")

remote1.OnServerEvent:Connect(function(player, weaponData)
	
	ds1:GetAsync(player.UserId, weaponData)
	
	ds1:SetAsync(player.UserId, weaponData)

	print("Data saved.")
	
end)

2 comments

0

Are you playing the live version of the game? (web.roblox.com) or the play button? If you're playing with the play button, try the live version.

0

Yeah i'm playing the live version with API services on.