WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:42am
#1
Hey , i try to find in all google how to open script with script and i dont find im want to use that for plugin to create script and then open it
local Script = Instance.new(Script, Sel:Get()[1])
Script.Name = “MyScript”
Script.Source = Message.Text
Script:OpenScript()
2 Likes
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:43am
#3
im using module script for the plugin
keremMCT
(Pepsi_Cat)
January 26, 2023, 11:43am
#4
well i dont think opening scripts are possible
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:44am
#5
so how i see plugins that doing that like RoTasks
keremMCT
(Pepsi_Cat)
January 26, 2023, 11:44am
#6
oh wait i think loadstring() would work
just do loadstring(code)
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:45am
#7
this is not open the script this is run the script
keremMCT
(Pepsi_Cat)
January 26, 2023, 11:46am
#8
yeah its running the script from a string
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:46am
#9
but i want to open the script tab in roblox studio
keremMCT
(Pepsi_Cat)
January 26, 2023, 11:46am
#10
why would you even wanna do that
What you are looking for is :OpenScript()
which is a method of plugin.
Plugin | Roblox Creator Documentation
2 Likes
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:50am
#12
OpenScript is not a valid member of Script
Nooo not a method of script. I said a method of the plugin not the script?
Check the documentation I sent you.
1 Like
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:52am
#14
but im need to create script and then open the script tab not the plugin script tab
BirdieI90
(Ping)
January 26, 2023, 11:54am
#15
but that is so easy
local Script = Instance.new("Script", game:GetService("Selection"):Get()[1] or workspace)
Script.Name = "MyScript"
Script.Source = Message.Text
plugin:OpenScript(Script)
3 Likes
What? You said you want to open a script you create and open it in an editor? The method I sent you does that (“Used to open the given script instance in an editor window, in Roblox studio, at the given line. If no line is given as an argument it will default to 1”).
You would just create the script, store it as a variable or something then use this method passing in the script you just created.
I am confused on what you are confused about. It is as simple as just selecting the script you make and then opening it with the :OpenScript()
method.
1 Like
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:56am
#17
but im use 2 script in 1 script i make the plugin toolbar and in the 2 script im create the script and more
keremMCT
(Pepsi_Cat)
January 26, 2023, 11:57am
#18
i had a stroke reading that, im serious please say it more clearly
3 Likes
I don’t understand how this would affect anything at all? A plugin is a plugin, it will not change if you do code in diffrent scripts?
2 Likes
WHYI_MFAT
(WHYI_MFAT)
January 26, 2023, 11:58am
#20
attempt to index nil with ‘OpenScript’
Show me the code you are trying.
1 Like