local ServerStorage = game:WaitForChild("ServerStorage")
local Ogetti = ServerStorage:WaitForChild("Oggetti")
local ReplicatedStorage = game:WaitForChild("ReplicatedStorage")
local Items = workspace:WaitForChild("Items")
local ServerStorage = game:GetService("ServerStorage")
local function bring(posizione,oggetto)
print(posizione,oggetto)
local ogg = ServerStorage.Oggetti[oggetto]:Clone()
print(ogg)
end
local function Prendi()
local s = Ogetti:GetChildren()
local f = s[math.random(1, #s)]
return f
end
local function spawns()
for i,v in pairs(Items:GetChildren()) do
if v.Name == "Oggetto" then
local a = Prendi()
print(v,a)
bring(v,a)
end
end
end
wait(game)
spawns()
i have this error inside the function "bring", at the "local ogg". Inside my game i have a Folder inside ServerStorage (called "Oggetti") and inside that folder there are some stuff. (Parts)
P.s. sorry for bad english

1 comment
Youve already referenced serverstorage at line 1 so change line 2 serverstorage to game