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

Making an IntValue the text of a txtLabel?

Asked by 10 years ago

I am trying to make an IntValue the text of the textlabel. I inserted this simple normal script into the IntValue which is a child of the textlabel. I'm actually having the same output for every script in this screen Gui, I am confused with this output:::: attempt to index global 'script' (a nil value)

while true do
    script.Parent.Parent.Text = ""..script.Parent.Value
end

I think the script looks fine but the output is what really makes me wonder... I'm also sorry for my recent spam of the overlapping parts question. I still haven't figured it out but thanks for all the help from people that actually tried. :)

1 answer

Log in to vote
0
Answered by
RedCombee 585 Moderation Voter
10 years ago
while wait() do -- You forgot to add a wait.
    script.Parent.Parent.Text = ""..tostring(script.Parent.Value) -- This is the tostring function. It makes any value a string.
end
0
I believe that this is how the tostring function is used. Hope this helps. RedCombee 585 — 10y
0
I totally forgot about the tostring. I will be posting another question about an IntValue if you would like to help me on that one to. :) raystriker6707 30 — 10y
Ad

Answer this question