Plugin PromptInsertFromFile(FileType fileType)

I’m looking for a method that lets us insert a model/script file to be returned as a variable in a script.

YieldFunction Instance Plugin:PromptInsertFromFile(FileType fileType)

As for what FileType is:
Enum.FileType

  • Enum.FileType.Model
  • Enum.FileType.Script
  • Enum.FileType.AnyRobloxFile

If the file fails to insert, or the user cancels it, the method will return nil.

Assuming FileType.Script is a .Lua file, do you think we could even ask for a text file?
Reason being, I’m trying to make a MoCap > Roblox Animation converter. Could be useful for a variety of other things I’m sure.

2 Likes

Can you provide some use cases for this? I’m not sure what it would be used for.

It would be so great if we could create files from strings. I want to make a minimap-generator plugin.

Exactly this. What would this be used for that you can’t do by just inserting it yourself via Studio the normal way?

Shortly after I made this post, I asked myself “What was I trying to do with this again?” and I couldn’t remember. I’m pretty much shaking my head for making this suggestion considering I don’t even remember what I want it for.

I feel like it was something similar to this, but probably not exact.
Sorry :S

You could have a plugin to make a tycoon or add gear to an in-game shop or something.
It would be nice to have “Choose model from Selection” and “Choose model from disk”.
(because the extra step of inserting it into the game first is such a pain [/semi-sarcasm])