so, there is a tutorial that makes a inventory system(not a mmorpg one i think) but in some part of the tutorial, the person makes 4 string values for inventory slots but when i tried it didnt happen, i tried putting other numbers and it isnt the number of slots(at least i think), the tutorial uses 3 scripts, 1 normal and 2 module scripts
normal one
local plr = game:GetService("Players")
local promptService, promptManager = game:GetService("ProximityPromptService"), require(script.prompt)
local init = require(script.init)
function playerAdded(p)
init.create(p)
end
plr.PlayerAdded:connect()
for _, p in next, plr:GetPlayers() do
spawn( function() playerAdded(p) end)
end
(the prompt thing will be used later i think)
the module one that creates a inventory folder
local slots = 20
function module.create(p)
local main = Instance.new("Folder")
main.parent = p
main.Name = "main"
for i = 1, slots do
local slot = Instance.new("StringValue")
slot.parent = main
slot.Name = tostring("slot " .. i)
end
end
what could be wrong in it?(just tell me the error and i’ll try to fix it if i can)