Categories > Exploiting > Scripts >
[Help] Problem with FocusLost with textboxes
Posted
Hello, I am making a custom UI library and I have a problem with the FocusLost function. So I don't know how to get text when focuslost on the textbox. Here is my code:
-- Add text box
function OranguLib:AddTextBox(text)
local TextBox = Instance.new("TextBox")
local callback = callback or function() end
TextBox.Parent = Container
TextBox.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
TextBox.BorderColor3 = Color3.fromRGB(255, 170, 0)
TextBox.Size = UDim2.new(0, 200, 0, 50)
TextBox.Font = Enum.Font.SourceSans
TextBox.PlaceholderColor3 = Color3.fromRGB(117, 117, 117)
TextBox.PlaceholderText = text or "Default placeholder"
TextBox.Text = ""
TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
TextBox.TextSize = 14.000
TextBox.Focused:Connect(function()
TextBox.BorderColor3 = Color3.fromRGB(41, 255, 41)
end)
TextBox.FocusLost:Connect(function() -- doesnt work
TextBox.BorderColor3 = Color3.fromRGB(255, 170, 0)
pcall(callback, text)
end)
end
main:AddTextBox("Print Text", function(input) -- doesnt print input
print(input)
end)
Added
@_realnickk Doesn't work sadly, it doesn print anything when focus is lost. Any ideas why?
Cancel
Post
I play minecraft and sometimes roblox with cheats
i use arch btw
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post