What does File do?

Today, I was about to begin a new script. so I accidentally press f, but then I saw this.

What is File, and what can it be used for?


The API Reference is here, let me read and add more info.


Could it be this?

1 Like

Okay did some reading, I’ll quote it:

" Files generate a temporary asset id in the form “rbxtemp://####” , which can be used in Studio without uploading the asset, but will be destroyed when the File is destroyed or when the Studio session ends. Temporary asset ids are not shared across Team Create"

So from what I’m reading, it creates a temporary asset ID, which I assume you can use to upload things to your game with scripts, without uploading them to roblox directly. This is used only in testing, from what I see, and takes a file asset from your local drive and creates a temporary asset.

Properties are Size, so File.Size, and has the function of GetTemporaryId() and GetBinaryContents()

1 Like

This is pretty weird, it seems like there some API on docs but, I try least using one single API and it gave me an error. I even try printing it, and it says nill


There’s no examples, so I’m not sure how to even upload a file with the script, it’s interesting, I’m gonna try some more research.

1 Like

Im thinking this could be some kinda error, or a beta feature enabled, I’m more confused on how this comes up as typecheck

Ok, so I used more brain cells.

It’s a way of temporary uploading an object as a temporary asset, but is destroyed within the game upon file deletion or when you end your Studio session/close roblox studio. I’m not sure how to upload at the moment, but I’m going to try to figure it out.