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

Attempt to concatenate local 'Name' (a nil value)?

Asked by 9 years ago

Alright so I am making a computer GUI for my Homeland Security agency within a government group it includes a Login screen,windows, screen and some programs under the start menu and it has given me an error which I will include my code a picture of the explorer and also a picture of the error it has given me.

01-- Login script
02 
03 
04 
05wait(0.1)
06 
07ap = require(game.Workspace.TrelloAPI)
08BoardID = "IQtYgu2z"
09ListID = ap:GetListID("Computer Logins",BoardID)
10 
11 
12 
13local player = script.Parent.Parent.Parent.Parent.Parent
14local userid = player.UserId
15local db = false
View all 38 lines...

Picture of the error: https://gyazo.com/0db1add23f2c41c3d677f3fed4d87b13

Picture of the explorer: https://gyazo.com/cec5d1c4d5a91559e6e8f066f0e5959c

1 answer

Log in to vote
0
Answered by
Ryukiyo 65
9 years ago

One of the most frequent mistakes made with an error such as this one is that the script fails to locate an object that hasn't been completely loaded into the game yet upon startup. Consider using the WaitForChild function to allow the script to wait until a certain object has been loaded properly.

Another mistake I found in the script that you may want to be aware of is contained within lines 34 - 38. You attempt to compare string values with mathematical operators, which will cause another error.

You can convert the strings to number values with the use of tonumber, or you can simply fix the issue by removing the secondary if statement since you are necessarily needing only one condition to be met for the script to continue running.

MINOR EDIT: You may also want to consider changing the name for "Name", as it may confuse the script with the object's actual name.

01-- Login script
02 
03wait(0.1)
04 
05ap = require(game.Workspace.TrelloAPI)
06BoardID = "IQtYgu2z"
07ListID = ap:GetListID("Computer Logins",BoardID)
08 
09local db = false
10local player = script.Parent.Parent.Parent.Parent.Parent
11local userid = player.UserId
12local placeid = game.PlaceId
13 
14script.Parent.MouseButton1Click:connect(function()
15    if not db then
View all 34 lines...

If you have any questions about the answer I provided, please message me back and I'll be happy to clear it up for you. Thanks.

Ad

Answer this question