So, I am trying to make a button which prints someones name when he write it. But when the save button is pressed the output says finding index nil.
Script -
local framePersonalBio = ScreenGui:WaitForChild("PersonalBio")
local frameMainButton = ScreenGui:WaitForChild("Button")
local buttonMain = frameMainButton.Buy
local buttonSavePersona = framePersonalBio.Main.Button
local nameInput = framePersonalBio.Main.Name.TextBox
buttonSavePersona.MouseButton1Click:Connect(function()
local name = nameInput.Text -- Line 23
if string.len(name) < 3 or string.len(name) > 40 then
return
else
print(tostring(name))
framePersonalBio.Visible = false
frameMainButton.Visible = true
end
end)
The script name is ButtonsHandler, and I want to acess the TextBox from “Name” ImageLabel.
The issue is,