Text = Value issues

What do you want to achieve? Keep it simple and clear!
I want to make it so whatever the text is in the textbox, is equal to the stringvalue’s value.
2. What is the issue? Include screenshots / videos if possible!
image
The script I wrote is not functionioning properly, I tried adding a print statement to check if it was working and it wasn’t printing.
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
image
This is what I tried. Attempted to flip it around, that didn’t work, put in a print statement to check if it was working, that didn’t print. I don’t know what’s going wrong here

What’s the type of the value you’ve added?

The type is a StringValue, where the value can be anything typed.

If you’re like trying to detect if the value has changed you can always do

stringValue.Changed:Connect(function()
  text.Text = stringValue.Value
end)

it didn’t work for me either so It’s concerning.

No need to use heartbeat.

local StringValue = script.Parent.StringValue

script.Parent.Changed:Connect(function(propertyChanged)
	
	-- Make sure that changed property is the text property
	if (propertyChanged ~= "Text") then return end
	
	-- Assign the current text value to the stringvalue
	StringValue.Value = script.Parent.Text
	
end)

Correction*

My bad I thought I was wrong but you don’t need to check a value like that as stated by Sinblade.

try to replace text.Text with script.Parent.TextBox.Text


I did a bit more experimenting, and ingame the Text value does not change when you type in the textbox. How would I get whatever the player types to equal the value?

This script is a local script, right? if it is then you cannot view print messages and the values because you’re seeing the explorer & output from a server view.

1 Like