You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
For the textbox to detect if there is actual text in it and if it passes through ROBLOX’s text filter.
What is the issue? Include screenshots / videos if possible!
When text is entered or the text is changed it doesn’t detect it
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to do a check if there is text in it also checking if the text has changed but neither has worked
(When using GetPropertyChangedSignal, it always detected the text being changed to “” when being cloned in)
local NameSelector = script.NameSelector:Clone()
NameSelector.Parent = player.PlayerGui
if NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox"):GetPropertyChangedSignal("Text")and NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox").FocusLost then
local success, err = pcall(function()
local FilterText = TextService:FilterStringAsync(NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox").Text, player.UserId)
return
end)
if not success then
NameSelector:FindFirstChild("Frame"):FindFirstChild("Warning").Visible = true
wait(2)
NameSelector:FindFirstChild("Frame"):FindFirstChild("Warning").Visible = false
return
end
if success and NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox").Text ~= "" and NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox").FocusLost then
print("success")
NameSelector:FindFirstChild("Frame"):FindFirstChild("Confirm").Visible = true
end
if NameSelector:FindFirstChild("Frame"):FindFirstChild("Confirm").MouseButton1Click and success then
ReplicatedStorage:WaitForChild("Remotes").Events.SetDataKey:FireClient(player, "FirstName", NameSelector:FindFirstChild("Frame"):FindFirstChild("TextBox").Text)
end
end
If your code is a server script (aka not a localscript) it won’t detect change from the textbox because changes to the text within the textbox is made on the client. It also depends on where the textbox is. If it is a screen GUI it is relatively simple, but if it is on a billboard GUI or a surface GUI, the billboard/surface GUI has to be located within screen GUI and adornee’d to the part in order for you to register anything. Also, I’m like 50% sure that the roblox text filter doesn’t work in studio, might have to double check.