I am trying to store a value in a NumberValue when a person types in a number in the text box and hits enter.
When the player hits enter, I want the value to be stored in the NumberValue
script.Parent.Frame.AyeInput.FocusLost:Connect(function(enterPressed)
if enterPressed then
script.Parent.Frame.AyeInput.AyeInputValue.Value = script.Parent.Frame.AyeInput.Text
end
end)
It seems like I am close, but I could be way off. The reason I want to store the value is because it will be used in another gui. I also want this to be used multiple times, so every time the player inputs a value, the value can keep changing.
Thank you.

3 comments
Did you make sure it is a local script? I copy and pasted the script into my game and it worked fine.
I tried both script and localscript and nothing seems to be happening. I put in a random numeric value in the text box, press enter, but the NumberValue doesn't change. It remains 0.
I don't think I should be using 'Text' in the script. When the user presses enter in the text box, I just need to save the value in the Number Value