I am making a floor tile generator, for a game like the backrooms but script wont work. It is supposed to be a 500 by 500 place with custom random generated rooms. Can you please help.
local Position = CFrame.new(0,0,0)
local posX = 0
for i = 1, 100 do
local items = Track:GetChildren()
local TrackPart = items[math.random(1, #items)]:Clone()
TrackPart.Parent = game.Workspace
TrackPart:SetPrimaryPartCFrame(Position)
posX += 25
TrackPart.Position = Vector3.new(posX, 0,0)
print(Position)
wait()
end`