tin_nim
(Null_Supressor)
September 28, 2021, 11:41am
#1
You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? I wanna use textbox by acessing the .Text property
What is the issue? TextBox.Text = nil
What solutions have you tried so far? Well On the dev forum the problom is solved for everyone else,The Local is in a function like this
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
local text = script.Parent.Text
Print(text) --nil
Yeah
1 Like
tin_nim:
Print(text)
Found a typo, it should be print(text)
not Print(text)
.
Here’s an Error example.
tin_nim
(Null_Supressor)
September 28, 2021, 11:44am
#3
No That’s just a typing typo,But print() still dont work
Try this…
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
print(script.Parent.Text)
end)
tin_nim
(Null_Supressor)
September 28, 2021, 11:47am
#5
Still not working it still print nil ive typed some random stuff into text box but still it dont work
The reason why your script doesn't pick up the text in TextBoxes is because TextBox input is client-sided.
Try changing your script to a LocalScript.
Ent3x
(Entex)
September 28, 2021, 11:50am
#7
In which textbox so you have a Button that u press and if it get pressed it should pick up the text of the button or the textbox and if its the textbox is it in the same GUI?
Can you send me a screenshot of the location of the text button in explore, I think seeing where it is located might help me out with understanding how to help you.
tin_nim
(Null_Supressor)
October 1, 2021, 7:15am
#9
This is solved,The textbox.text must be getted locally
1 Like