TextBox.FocusLost isn't detecting

  1. What do you want to achieve? I want a Function to call their function

  2. What is the issue? Text in TextBox is changing but it’s not calling a function

  3. What solutions have you tried so far?

  • I try looking for a solution in a DevForum but didn’t work
  • I try using
textBox:GetPropertyChangedSignal("Text"):Connect()

but didn’t work

Script:

local UserInputService = game:GetService("UserInputService")

local TextBox = script.Parent

local inOrder = 1

TextBox.FocusLost:Connect(function(enterPressed)
    --I put a Script here but I won't tell because it's secret
end)

Feel free to ask me!

Well, nobody is going to be able to help you if you do not provide where the possible issue lies…
Try using print on the textBox and see if it works

I try using print on TextBox but indeed didn’t work, So I try printing some random text on line 1 and it prints

I copied your exact code, and it printed it in the output,

local UserInputService = game:GetService("UserInputService")

local TextBox = script.Parent

local inOrder = 1

TextBox.FocusLost:Connect(function(enterPressed)
	--I put a Script here but I won't tell because it's secret
	print("Test")
end)

Something must be wrong with the code you had put in, but I cannot help you much further if you do not provide the code needed to assist you in this problem.

is it localscript or normalscript aka serverscript

Make sure you are using a LocalScript, normal scripts can’t detect client-sided inputs

I completely discarded that, but yeah, if it is a serverscript it cannot detected changes made on clients

It’s a Normal Script it’s not a localscript why ask me that?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.