I’m having issues where I have a button over a TextBox, and when you click said button, it should empty the search. However, when I click it, nothing happens. Neither of the below connections fire either when I click the button. However, if I double click, then both connections fire (activated, then Text changed)
The button has all default properties, so I don’t know why I’m having to double click it
Nah, I have a print in both functions, and neither prints. So even though the mouse icon changes to show I can click on it, clicking does nothing, the connection is never fired. I have to double click to cause the event to happen for some reason
I just tried doing InputBegan on the close button, and it only picked up when my mouse hovers over it. Not any clicking. And also tried doing Search.Focused, and that only printed when I clicked on the search box, so its not overriding the button either
lmao I got the same issue, but I fixed it by changing the TextButton Zindex to 2 ( probably varies a bit depending on where stuff is )
TextBox Zindex = 1
TextButon Zindex = 2
local TextBox = script.Parent.TextBox
local TXTbutton = TextBox.TextButton
TXTbutton.Activated:Connect(function()
print("Clicked")
end)
function UpdateSearch()
print("UPDATE")
end
TextBox:GetPropertyChangedSignal("Text"):Connect(UpdateSearch)
although it may not help can we just see your functions, it would be best to have as much info as possible. You could also try using MouseButton1Click.
Okay I think I found a solution to the problem, but ima need confirmation. I was noticing that whenever I was typing in the text box I couldnt click the text button, so I tried adding a new function to release focus
→
local TextBox = script.Parent.TextBox
local TXTbutton = TextBox.TextButton
TXTbutton.Activated:Connect(function()
print("Clicked")
end)
TXTbutton.MouseEnter:Connect(function()
TextBox:ReleaseFocus()
end)
function UpdateSearch()
print("UPDATE")
end
TextBox:GetPropertyChangedSignal("Text"):Connect(UpdateSearch)
Its working really well I tried double checking as much as I could.