Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A lil hard to explain, But I'll try to explain!
- Okay, So lets say that you'd make a folder in workspace
- and put a TextBox in it
- And the value "Text" inside TextBox would be "Hello"
- So, And you would create a script inside TextBox with the script
- "
- Message = script.Parent.Text
- print(Message)
- "
- That would return the text inside TextBox!
- So, Now I'll tell you how you'd make a gui with such
- So lets say that you put the textbox inside of a ScreenGui inside of StarterGui!
- So, it'd be the same, the script inside of the TextBox
- But the script would be
- "
- te = script.Parent.Text
- script.Parent.FocusLost:connect(function(ep)
- if ep then
- loadstring(te)()
- end
- end)
- "
- So, That script will call a function called "FocusLost" when you click something else
- and lose focus of the textbox, So. If you lose focus because of pressing "Enter"
- then it will call a function called "EnterPressed" which i called "ep" in function
- So, when that happens it will continue to the script i wanted it to run
- which is "loadstring(ep)()" That will call the script! which will pretty much make the script run!!
- BY THE WAY!! YOU NEED LOADSTRINGS ENABLED INSIDE OF SERVERSCRIPTSERVICE!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement