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

attempt to index field, a string value?

Asked by 5 years ago
Edited 5 years ago

For some reason in the output it said "Workspace.Map Generator:26: attempt to index field 'Value' (a string value)" for line 26 but when I had the basically the same line of code in other places and it worked fine. Here is the code:

01local TopText = script.TopText
02while true do
03    timer = 60
04    repeat
05        timer = timer-1
06        TopText.Value = "Intermission ("..timer..")"
07        wait(1)
08    until timer == 0
09    TopText.Value = "Picking Random Map..."
10    wait()
11    m = game.Lighting.Maps:GetChildren()
12    r = math.random(1,#m)
13    map = m[r]:clone()
14    map.Parent = workspace
15    TopText.Value = "The Map Chosen Was "..map.Name.."!"
View all 34 lines...

if you figure out the reason please tell and thank you to in advance if anyone finds the problem.

0
"TopText.Value.Text" change this to "TopText.Value" Imperialy 149 — 5y

1 answer

Log in to vote
1
Answered by
EteraW 77
5 years ago
Edited 5 years ago

You put .Value.Text so Text is not in the Value. Change it.

1TopText.Value = ""..timer.." Seconds Until The Wall"
0
thank you kizi3000 88 — 5y
Ad

Answer this question