Textbox FocusLost() event doesn't fire

Hello! I have a script but the FocusLost() event doesn’t fire. If you can help, thank you.

local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
local character = player.Character or player.CharacterAdded:Wait()

local textBox = script.Parent

local value = script.Parent.Parent.Parent:FindFirstChildOfClass("IntValue")

textBox.FocusLost:Connect(function()
	print("begin")
	if tonumber(textBox.Text) == nil then
		textBox.Text = "0"
		value.Value = 0
	else
		value.Value = tonumber(textBox.Text)
	end
	print("done")
end)
1 Like

The script only works in a local script

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