I'm trying to import a custom text file I made using python, however copy and pasting it into a roblox scripts completely crashes roblox studio. The text is a 644mb table which I want to use in roblox studio.
Is there any way for me to somehow get the text from a .txt on my computer to roblox studio via an api or something?
This will not work, even if you manage to get the text into the script for many reasons:
Roblox will likely not save a script of that size onto their servers, so it will get deleted whenever you publish the game
Even if it is saved, Roblox game servers do not have much memory and using 644MB on a variable will almost definitely crash the game.
Are you absolutely certain that every part of this file is important? 644mb of text is a crazy amount. That is over 60 million letters in the file; I really cannot think of any reason you would ever need this much data in any game, let alone a roblox game.
if you really want to use this text file, what you need is a HTTP server to host it in chunks of no more than 10MB (ideally less) and then you can download them individually, process them, and then delete them. Remember, if you download too much into a script, the game will crash.
For the host I recommend using github (since basically no one else will store a text file of that size for free) and on Roblox you would need to use the HTTPService. I can't provide specific details since its not clear what you need exactly.