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)