TextBox.FocusLost is not firing

  1. What do you want to achieve? Keep it simple and clear!
    I’m working on custom console for command executing
  2. What is the issue? Include screenshots / videos if possible!
    FocusLost doesn’t seem to fire
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tryed looking though posts but idk what cause this
DevConsole.OnClientEvent:Connect(function(Console)
	local text = {
		["name"] = "DEVELOPER CONSOLE",
		["ConsoleLog"] = function (pName, pGroup, PNStatus, Access)
			return 'Username: '..pName..'\nPermission Group: '..pGroup..'\nPeal Network Status: '..PNStatus..'\nAccess..'..Access
		end
	}
	
	
	Console.MainFrame:TweenPosition(UDim2.new(0,0,0,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5)
	textAnimate(Console.MainFrame.NameFrame.TextLabel, text["name"])
	textAnimate(Console.MainFrame.ConsoleFrame.TextLabel, text["ConsoleLog"](Console:GetAttribute("pName"), Console:GetAttribute("pGroup"), Console:GetAttribute("PNStatus"), Console:GetAttribute("Access")))
	Console.MainFrame.ConsoleFrame.TextBox.FocusLost:Connect(function(ep)
		if ep then
			local text = Console.MainFrame.ConsoleFrame.TextBox.Text
			print(text)
			Command:FireServer(text)
		end
	end)
end)

Also this is LOCAL SCRIPT, don’t ask me if this is server, no this is local one.

1 Like

If you put a couple of print statements in the code, at the start of the OnClientEvent, and before the if ep then [outputting the value of ep]), it’ll help you ensure that the connection is actually being set up.

Is it a billboardgui/surfacegui? If so you’ll need to put the gui inside PlayerGui and set it’s adornee to that part.

Sorry for a late answer, but OnClientEvent is working atm(because gui get tweened and text get animated), also if i remove ep statement nothing changes print still don’t work

No that’s not. That’s just gui

Edit: Oh it seems to fire if i put it right before these lines

Console.MainFrame:TweenPosition(UDim2.new(0,0,0,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5)
	textAnimate(Console.MainFrame.NameFrame.TextLabel, text["name"])
	textAnimate(Console.MainFrame.ConsoleFrame.TextLabel, text["ConsoleLog"](Console:GetAttribute("pName"), Console:GetAttribute("pGroup"), Console:GetAttribute("PNStatus"), Console:GetAttribute("Access")))

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