Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How could i insert a table that is the player's name into a dictionary?

So basically, in a nutshell, I'm attempting to sort an inventory system by putting multiple tables of values into other tables, however I am stumped at how i can achieve this.

local events = game.ReplicatedStorage.Inventory
local playerInventories = {
	
}
events.PickingUp.OnServerEvent:Connect(function(p,mouse)
	if mouse.target:FindFirstChild("PickUpValue") ~= nil and (p.Character.UpperTorso.position-mouse.hit.p).magnitude <= 10 then
		if playerInventories.p == nil then
			local p = {}
			table.insert(playerInventories,p{})
		end
	end
end)

EDIT: Thanks for any help

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.