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

I keep getting an error?

Asked by 9 years ago

I keep getting an error on line 2 saying: attempt to concatenate field 'Lvl' (a userdata value)

My script:

while true do
    script.Parent.Text = "Lvl: "..script.Parent.Parent.Lvl..""
    wait(0.1)
end
0
If you're confused, take this model so you can see what I have done: http://www.roblox.com/Take-if-your-gonna-help-l-item?id=188111196 Operation_Meme 890 — 9y

1 answer

Log in to vote
1
Answered by
Discern 1007 Moderation Voter
9 years ago

You're attempting to concatenate an instance, not a string. I think what you're trying to concatenate is the instance's value, not its name.

Check this out:

while true do
    script.Parent.Text = "Lvl: "..script.Parent.Parent.Lvl.Value..""
    wait(0.1)
end
0
Omg, what a silly mistake. I can't belive that I forgot about that, thanks! Operation_Meme 890 — 9y
Ad

Answer this question