This script should automatically and infinitely check an int value's value and insert it into my text in my textbutton.
local button = script.Parent.TextButton
local text = button.Text
while wait() do
local num = game.Workspace:WaitForChild("NumParts").Value
text.Value = ("Click to Place Parts! "..num.."/3 Parts.")
end
I keep on getting the error attempt to index local 'text' (a string value) and I don't know what to do about it.
EDIT: This is in a normal script

1 comment
A. The variable "text" is assigned to a string, not a value instance. B. The text will never change because of indirect assignment; the value of the variable changes but the text in the TextButton(?) does not.