Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the text on line 265 a bad argument??

Asked by 8 years ago

I have a textBox search engine script but it didn't work, When I looked at the output it said "14:38:10.825 - Players.Player1.PlayerGui.LocalScript:265: bad argument #3 to 'Text' (string expected, got boolean)"

I don't know what that means and yes I did look around and didn't find anything, Here is the part of the script that it is yelling at me for:

e.FocusLost:connect(function ()
    local text = Type.Text
    if text == "spiderman90438" then
        textone.Text = "spiderman90438 is the Owner & Founder of Roogle, He currently is a Ro-Wrestler, Developer, And Youtuber," and texttwo.Text == "spiderman90438 signed into roblox at Nov, 28th, 2012, He is a 1x U.S champion and 1x Warriors champion, He is currently looking for developer offers."
    elseif text == "spiderman90438" then
        textone.Text = "spiderman90438 is the owner of roogle"
    elseif text == "Puppies" then
        textone.Text = "Puppies are cute."  --Etc. Keep doing this until you end up with your desired result. 
    end
end)

Here is the whole script in case you need it:




local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent local frame = Instance.new("Frame") frame.Parent = screenGui frame.Position = UDim2.new(0, -100, 0, -100) frame.Size = UDim2.new(0, 2500, 0, 2500) frame.BackgroundColor3 = BrickColor.White().Color wait (3) local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 700, 0, 350) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "W" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Green().Color wait (0.2) textLabel.Text = "We" wait (0.2) textLabel.Text = "Wel" wait (0.2) textLabel.Text = "Welc" wait (0.2) textLabel.Text = "Weloc" wait (0.2) textLabel.Text = "Weloco" wait (0.5) textLabel.Text = "Weloc" wait (0.8) textLabel.Text = "Welo" wait (0.1) textLabel.Text = "Wel" wait (0.5) textLabel.Text = "Welc" wait (0.2) textLabel.Text = "Welco" wait (0.2) textLabel.Text = "Welcom" wait (0.2) textLabel.Text = "Welcome" wait (0.2) textLabel.Text = "Welcome " wait (0.2) textLabel.Text = "Welcome T" wait (0.2) textLabel.Text = "Welcome To" wait (3) textLabel:Destroy() local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 700, 0, 350) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "Roogle" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Red().Color for i = 100,0,-1 do textLabel.TextTransparency = i/100 wait() end wait (3) textLabel:Destroy() wait (2) textLabel:Destroy() local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 700, 0, 350) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "PM the owner of the game/spiderman90438 to put a Game/Group in the system" textLabel.Font = "Legacy" textLabel.FontSize = 5 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Red().Color wait (5) textLabel:Destroy() wait (3) local Type = Instance.new("TextBox") Type.Parent = screenGui Type.Position = UDim2.new(0, 425, 0, 200) Type.Size = UDim2.new(0, 750, 0, 50) Type.BackgroundColor3 = BrickColor.White().Color Type.Text = "Roogle Searchbar | Click me and type !" Type.Font = "Legacy" Type.FontSize = 5 Type.BorderColor3 = BrickColor.White().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 550, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "R" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Blue().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 625, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "o" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Red().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 700, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "o" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Yellow().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 775, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "g" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Blue().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 825, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "l" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Green().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 875, 0, 100) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "e" textLabel.Font = "Legacy" textLabel.FontSize = 14 textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = BrickColor.Red().Color local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 650, 0, -8) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "Roogle is protected by Roblox Rules - Illegal Activitys, Tips: If you search something it is gonna be politically correct, For ex: Stickmasterluke not stickmasterluke or stickMasterluke " textLabel.FontSize = 2 textLabel.BackgroundTransparency = 1 local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 650, 0, 4) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "Keywords: Unknown games | Games | Restaurants | Groups | All of the genres | Unknown people | Wrestling Groups | Restaurant Groups | Sponsors | Youtubers | Famous People | Help | " textLabel.FontSize = 2 textLabel.BackgroundTransparency = 1 local textone = Instance.new("TextLabel") textone.Parent = screenGui textone.Position = UDim2.new(0, 775, 0, 400) textone.Size = UDim2.new(0, 150, 0, 50) textone.BackgroundColor3 = BrickColor.White().Color textone.Text = "" textone.Font = "Legacy" textone.FontSize = 5 textone.BackgroundTransparency = 1 local texttwo = Instance.new("TextLabel") texttwo.Parent = screenGui texttwo.Position = UDim2.new(0, 775, 0, 435) texttwo.Size = UDim2.new(0, 150, 0, 50) texttwo.BackgroundColor3 = BrickColor.White().Color texttwo.Text = "" texttwo.Font = "Legacy" texttwo.FontSize = 5 texttwo.BackgroundTransparency = 1 local textone = Instance.new("TextLabel") textone.Parent = screenGui textone.Position = UDim2.new(0, 775, 0, 400) textone.Size = UDim2.new(0, 150, 0, 50) textone.BackgroundColor3 = BrickColor.White().Color textone.Text = "" textone.Font = "Legacy" textone.FontSize = 5 textone.BackgroundTransparency = 1 local textone = Instance.new("TextLabel") textone.Parent = screenGui textone.Position = UDim2.new(0, 775, 0, 400) textone.Size = UDim2.new(0, 150, 0, 50) textone.BackgroundColor3 = BrickColor.White().Color textone.Text = "" textone.Font = "Legacy" textone.FontSize = 5 textone.BackgroundTransparency = 1 local textone = Instance.new("TextLabel") textone.Parent = screenGui textone.Position = UDim2.new(0, 775, 0, 400) textone.Size = UDim2.new(0, 150, 0, 50) textone.BackgroundColor3 = BrickColor.White().Color textone.Text = "" textone.Font = "Legacy" textone.FontSize = 5 textone.BackgroundTransparency = 1 Type.FocusLost:connect(function () local text = Type.Text if text == "spiderman90438" then textone.Text = "spiderman90438 is the Owner & Founder of Roogle, He currently is a Ro-Wrestler, Developer, And Youtuber," and texttwo.Text == "spiderman90438 signed into roblox at Nov, 28th, 2012, He is a 1x U.S champion and 1x Warriors champion, He is currently looking for developer offers." elseif text == "spiderman90438" then textone.Text = "spiderman90438 is the owner of roogle" elseif text == "Puppies" then textone.Text = "Puppies are cute." end end)

On line 265 I put and to do both text lines but I think it was wrong, I honestly looked and I can't find anything except for the bad argument on text, I don't know what that means, Please explain?

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

You have a completely random "and" on line 262

I believe this is the problem. It was probably a typo, I'm unsure the reason for this.

local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent


local frame = Instance.new("Frame")
frame.Parent = screenGui
frame.Position = UDim2.new(0, -100, 0, -100)
frame.Size = UDim2.new(0, 2500, 0, 2500)
frame.BackgroundColor3 = BrickColor.White().Color

wait (3)


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 700, 0, 350)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "W"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Green().Color
wait (0.2)
textLabel.Text = "We"
wait (0.2)
textLabel.Text = "Wel"
wait (0.2)
textLabel.Text = "Welc"
wait (0.2)
textLabel.Text = "Weloc"
wait (0.2)
textLabel.Text = "Weloco"
wait (0.5)
textLabel.Text = "Weloc"
wait (0.8)
textLabel.Text = "Welo"
wait (0.1)
textLabel.Text = "Wel"
wait (0.5)
textLabel.Text = "Welc"
wait (0.2)
textLabel.Text = "Welco"
wait (0.2)
textLabel.Text = "Welcom"
wait (0.2)
textLabel.Text = "Welcome"
wait (0.2)
textLabel.Text = "Welcome "
wait (0.2)
textLabel.Text = "Welcome T"
wait (0.2)
textLabel.Text = "Welcome To"

wait (3)
textLabel:Destroy()


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 700, 0, 350)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "Roogle"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Red().Color

for i = 100,0,-1 do
    textLabel.TextTransparency = i/100
    wait()
end

wait (3)
textLabel:Destroy()

wait (2)
textLabel:Destroy()

local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 700, 0, 350)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "PM the owner of the game/spiderman90438 to put a Game/Group in the system"
textLabel.Font = "Legacy"
textLabel.FontSize = 5
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Red().Color

wait (5)
textLabel:Destroy()



wait (3)


local Type = Instance.new("TextBox")
Type.Parent = screenGui
Type.Position = UDim2.new(0, 425, 0, 200)
Type.Size = UDim2.new(0, 750, 0, 50)
Type.BackgroundColor3 = BrickColor.White().Color
Type.Text = "Roogle Searchbar | Click me and type !"
Type.Font = "Legacy"
Type.FontSize = 5
Type.BorderColor3 = BrickColor.White().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 550, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "R"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Blue().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 625, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "o"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Red().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 700, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "o"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Yellow().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 775, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "g"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Blue().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 825, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "l"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Green().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 875, 0, 100)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "e"
textLabel.Font = "Legacy"
textLabel.FontSize = 14
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = BrickColor.Red().Color


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 650, 0, -8)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "Roogle is protected by Roblox Rules - Illegal Activitys, Tips: If you search something it is gonna be politically correct, For ex: Stickmasterluke not stickmasterluke or stickMasterluke "
textLabel.FontSize = 2
textLabel.BackgroundTransparency = 1


local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 650, 0, 4)
textLabel.Size = UDim2.new(0, 150, 0, 50)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.Text = "Keywords: Unknown games | Games | Restaurants | Groups | All of the genres | Unknown people | Wrestling Groups | Restaurant Groups | Sponsors | Youtubers | Famous People | Help | "
textLabel.FontSize = 2
textLabel.BackgroundTransparency = 1



local textone = Instance.new("TextLabel")
textone.Parent = screenGui
textone.Position = UDim2.new(0, 775, 0, 400)
textone.Size = UDim2.new(0, 150, 0, 50)
textone.BackgroundColor3 = BrickColor.White().Color
textone.Text = ""
textone.Font = "Legacy"
textone.FontSize = 5
textone.BackgroundTransparency = 1


local texttwo = Instance.new("TextLabel")
texttwo.Parent = screenGui
texttwo.Position = UDim2.new(0, 775, 0, 435)
texttwo.Size = UDim2.new(0, 150, 0, 50)
texttwo.BackgroundColor3 = BrickColor.White().Color
texttwo.Text = ""
texttwo.Font = "Legacy"
texttwo.FontSize = 5
texttwo.BackgroundTransparency = 1


local textone = Instance.new("TextLabel")
textone.Parent = screenGui
textone.Position = UDim2.new(0, 775, 0, 400)
textone.Size = UDim2.new(0, 150, 0, 50)
textone.BackgroundColor3 = BrickColor.White().Color
textone.Text = ""
textone.Font = "Legacy"
textone.FontSize = 5
textone.BackgroundTransparency = 1


local textone = Instance.new("TextLabel")
textone.Parent = screenGui
textone.Position = UDim2.new(0, 775, 0, 400)
textone.Size = UDim2.new(0, 150, 0, 50)
textone.BackgroundColor3 = BrickColor.White().Color
textone.Text = ""
textone.Font = "Legacy"
textone.FontSize = 5
textone.BackgroundTransparency = 1


local textone = Instance.new("TextLabel")
textone.Parent = screenGui
textone.Position = UDim2.new(0, 775, 0, 400)
textone.Size = UDim2.new(0, 150, 0, 50)
textone.BackgroundColor3 = BrickColor.White().Color
textone.Text = ""
textone.Font = "Legacy"
textone.FontSize = 5
textone.BackgroundTransparency = 1


Type.FocusLost:connect(function ()
    local text = Type.Text
    if text == "spiderman90438" then
        textone.Text = "spiderman90438 is the Owner & Founder of Roogle, He currently is a Ro-Wrestler, Developer, And Youtuber,"
        texttwo.Text == "spiderman90438 signed into roblox at Nov, 28th, 2012, He is a 1x U.S champion and 1x Warriors champion, He is currently looking for developer offers."
    elseif text == "spiderman90438" then
        textone.Text = "spiderman90438 is the owner of roogle"
    elseif text == "Puppies" then
        textone.Text = "Puppies are cute." 
    end
end)

Good Luck!

If I helped, please don't forget to accept my answer.
Ad

Answer this question