Hey guys,
I've been making an admin panel, and it uses a TextBox to enter the Target's name.
The idea is that upon changing the TextBox.Text, the script checks if the entered player exists, and returns a print("Found!").
However, while typing the name, the script just keeps on printing "Nope!" every letter you type.
How do I make it check only when the user presses Enter when in the TextBox selection, so it doesn't spam print"Nope!" anymore?
local target = script.Parent.Text
script.Parent.Changed:Connect(function()
if game.Players:FindFirstChild(target) then
print("Found!")
else
print("Nope!")
end
end)

1 comment
Found a diffrent solution, but this too works! Thanks for the explanation, will be using this due to a better debug :)