Line: local data {}

-- Generate blocks

local numberOfBlocks = #game:GetService("ServerStorage"):WaitForChild("ToolModels"):GetChildren()

local studGap = 9 -- Gap between each box

local box = game.Workspace:WaitForChild("ItemRoller").Box0

for i = 1,numberOfBlocks-1,1 do

newbox = box:Clone()

newbox:SetPrimaryPartCFrame(newbox.PrimaryPart.CFrame * CFrame.new(16*i,0,0))

newbox.Name = "Box"..i

newbox.Parent = game.Workspace.ItemRoller

end

for i, v in pairs(game.ServerStorage.ToolModels:GetChildren()) do

if v then

new = v:Clone()

new:SetPrimaryPartCFrame(game.Workspace.ItemRoller["Box"..i-1].Hitbox.CFrame)

new.Parent = game.Workspace.ItemRoller["Box"..i-1]

end

end

game.ReplicatedStorage:WaitForChild("RequestInformation").OnServerInvoke = function(plr, item)

local data {}

local bought = false

local descreption = game.ServerStorage.ToolModels[item.Name].Information.Description.Value

local title = item.Name

local cost = game.ServerStorage.ToolModels[item.Name].Information.Value

local CostType = game.ServerStorage.ToolModels[item.Name].CostType.Value

if game.ServerStorage.PlayerTools[plr.Name]:FindFirstChild(item.Name) then

-- They bought it

bought = true

else

bought = false

end

table.insert(data,1,title)

table.insert(data,2,description)

table.insert(data,3,cost)

table.insert(data,4,costType)

table.insert(data,5,bought)

return data

end

1 comment

0

Put a = after data lol

local data = {}