Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

textbox that saves text not working?

Asked by 5 years ago

Hi,

I am trying to do something with a textbox gui that may not even be possible.

So bassically i am trying to make a real time text saver that will save any amount of text entered into a textbox.

local savedText --Variable that will save text

script.Parent.Focused:Connect(function() --function that will detect player using textbox script.Parent.Text = savedText print("focused") while true do wait(0.1) --real time process that will save any entered text
script.Parent.Text = savedText
end end)

script.Parent.FocusLost:Connect(function() print("focus lost") script.Parent.Text = savedText --save the text when player is done using textbox end)

Any help will be appreciated. Thanks!

1 answer

Log in to vote
0
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
5 years ago

I believe you're trying to achieve a result for when you click on a TextBox the content isn't removed. This is something that can be possible without the aid of a Script, simply uncheck the property ClearTextOnFocus.

0
Remember to accept this answer if it helps Ziffixture 6913 — 5y
0
i am dumb. thanks! DenverXDXDXD 4 — 5y
Ad

Answer this question