I really don't understand what indexing is in lua. If anyone could tell me this would probably solve most of my problems. Basically I tried to make a script where the Worker1Cost value would be displayed on a text label. But I get the error Attempt to Index a Nil value. I would appreciate if you would explain what the error actually means.
while wait() do
local player = game.Players.LocalPlayer
script.Parent.Text = player:WaitForChild("gen"):FindFirstChild("Worker1Cost").Value .. " Robux"
end

2 comments
Indexing means getting a property or method of an object. Also, what are you doing with "Value .. ' Robux'"? That's probably why you're getting the error.
I fixed this but I wanted the text label to display the value then robux after it