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:

01e.FocusLost:connect(function ()
02    local text = Type.Text
03    if text == "spiderman90438" then
04        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."
05    elseif text == "spiderman90438" then
06        textone.Text = "spiderman90438 is the owner of roogle"
07    elseif text == "Puppies" then
08        textone.Text = "Puppies are cute."  --Etc. Keep doing this until you end up with your desired result.
09    end
10end)

Here is the whole script in case you need it:

001local screenGui = Instance.new("ScreenGui")
002screenGui.Parent = script.Parent
003 
004 
005local frame = Instance.new("Frame")
006frame.Parent = screenGui
007frame.Position = UDim2.new(0, -100, 0, -100)
008frame.Size = UDim2.new(0, 2500, 0, 2500)
009frame.BackgroundColor3 = BrickColor.White().Color
010 
011wait (3)
012 
013 
014local textLabel = Instance.new("TextLabel")
015textLabel.Parent = screenGui
View all 268 lines...

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.

001local screenGui = Instance.new("ScreenGui")
002screenGui.Parent = script.Parent
003 
004 
005local frame = Instance.new("Frame")
006frame.Parent = screenGui
007frame.Position = UDim2.new(0, -100, 0, -100)
008frame.Size = UDim2.new(0, 2500, 0, 2500)
009frame.BackgroundColor3 = BrickColor.White().Color
010 
011wait (3)
012 
013 
014local textLabel = Instance.new("TextLabel")
015textLabel.Parent = screenGui
View all 269 lines...

Good Luck!

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

Answer this question