Unknown problem with my script builder??
So I am making a GUI-based script build with a TextBox and TextButton that runs the code when it's clicked. The main code is a LOCALScript under the ScreenGui there's a normal script with a StringValue as a child named "Source". The normal script is a child of the local script. ScreenGui -> LocalScript -> Normal script (So code doesn't run local) -> StringValue (Source)
And yes, the normal script IS disabled.
Also the LocalScript is named "sfunction", the ScreenGui "scripter" and the normal script is named "runcode".
LocalScript's code:
01 | local runscript = script.runcode |
02 | local screen = script.Parent |
03 | local frame = screen.Frame |
06 | run.MouseButton 1 Click:connect( function () |
07 | local code = frame.tscript.Text |
08 | local newscript = runscript:Clone() |
09 | newscript.Parent = workspace |
10 | newscript.Source.Value = code |
11 | newscript.Disabled = false |
Normal script:
1 | local source = script:WaitForChild( "Source" ) |
2 | loadstring (source.Value)() |
Output:
20:55:04.232 - An error occurred
20:55:04.233 - Script 'Players.Player1.PlayerGui.scripter.sfunction', Line 10
20:55:04.234 - stack end
Thank you