Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

attempt to index upvalue 'name' (a string value)?

When my script executes I get the error attempt to index upvalue 'name' (a string value)

I'm not sure why I keep getting this error.

My Code

local code = script.Parent.Parent.View -- NumberValue
local name = script.Parent.Name -- TextGUI
local desc = script.Parent.Description -- TextGUI


		local val = code.Value
		local value = tostring(val)
		name.Text = Names["N".. value]
		desc.Text = Descriptions["D".. value]

1 answer

✓ Accepted answer

When you are trying to reference "Name" you are just indexing the Name property of script.Parent. To fix this you are going need to change the name of your TextGUI.

1 comment

0

Thank you :)

This discussion is preserved as it was. New answers, comments, and votes are closed.