This time I want to make inventory system but I dont know how to make.
And I searched but I couldnt understand yet.
At first The inventory will be like this,
and there are 117 slots.
this is explorer.
There are 117 slot.
I want to save/load
Itemname(String) and Howmany(IntValue)
.
local script location is in the exploror
This is ServerScriptService script.
local Players = game:GetService("Players")
local DataStore = game:GetService("DataStoreService"):GetDataStore("Ineventory")
local RemoteEvent = game.ReplicatedStorage.RemoteEvents.Shops
Players.PlayerAdded:Connect(function(player)
local LoadItemRemoteEvent = RemoteEvent.LoadItem
local data = {}
local playerId = player.UserId
--I want to load and set "HowmanyValue and ItemName to the gui,
--I think I need to use remoteEvent.
end)
Players.PlayerRemoving:Connect(function(player)
local SaveItemRemoteEvent = RemoteEvent.LoadItem
local data = {}
local playerId = player.UserId
--I want to save data HowmanyValue and ItemName to the Datastore,
end)
This is local script script.
local RemoteEvent = game.ReplicatedStorage.RemoteEvents.Shops
RemoteEvent.LoadItem.OnClientEvent:Connect(function(data)
--loadItem
end)
Some one please help my script.