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

attempt to index field 'Name' (a string value)?

Asked by 8 years ago

Im getting this error in my script. Im not sure what it means, could you help?

attempt to index field 'Name' (a string value)

spawnName = {"Map1", "Map2", "Map3"}
spawnDesc = {"Lolololol", "cheese", "beans"}
index = 1
script.Parent.Next.MouseButton1Click:connect(function()
    script.Parent.Name.Text = spawnName[index]
    script.Parent.Desc.Text = spawnDesc[index]
    index = index + 1
end)
1
It's because the script thinks you're trying to rename the "Next" button. Change the Name object's name to something that will not confuse the script. M39a9am3R 3210 — 8y
0
thanks LittleBigDeveloper 245 — 8y

Answer this question