Players.Alfiepro98234.PlayerGui.LocalScript:13: attempt to index string with 'Text'

Hello everyone!

I was trying to make a script where you can collect mesh parts from around the map.

and I made a function to set the text label text to the string in the function and it keeps giving me the error

`Players.Alfiepro98234.PlayerGui.LocalScript:13: attempt to index string with ‘Text’

function SetDescription(Description)
	Description.Text = Description
end

I was calling by doing SetDescription("Test String")

Probably because your function argument is the same as the description instance. Try renaming the Description in the function to descriptionText

function SetDescription(descriptionText)
	Description.Text = descriptionText
end
2 Likes

Thanks man!

your a real one at my dumb times :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.