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:
01 | local TopText = script.TopText |
06 | TopText.Value = "Intermission (" ..timer.. ")" |
09 | TopText.Value = "Picking Random Map..." |
11 | m = game.Lighting.Maps:GetChildren() |
14 | map.Parent = workspace |
15 | TopText.Value = "The Map Chosen Was " ..map.Name.. "!" |
16 | local Spawn = map.Spawn |
18 | plrs = game.Players:GetChildren() |
20 | plrs [ i ] .Character:MoveTo(map.Spawn.Spawn.Position+Vector 3. new(math.random(- 5 , 5 ), 0 ,math.random(- 5 , 5 ))) |
26 | TopText.Value.Text = "" ..timer.. " Seconds Until The Wall" |
29 | Wall = game.ServerStorage.Wall:Clone() |
31 | Wall.Position = Spawn.Position |
if you figure out the reason please tell and thank you to in advance if anyone finds the problem.