Desc is not a valid member of Frame

What I want to do:
I just create description TextLabel that shows description of an item from module when you click on it.

…and where the problem?
Basically, when I click on the button it logs in output:


The code:

module = require(game.ReplicatedStorage.Module.Tower)
for i,v in pairs(module) do
	local ae = game.ReplicatedStorage.button:Clone()
	ae.Parent = script.Parent.ScrollingFrame
	ae.Name = v.Name
	ae.ImageLabel.TextLabel.Text = v.Name
	ae.ImageLabel.Image = v.Icon
	ae.MouseButton1Click:Connect(function()
		
	script.Parent.Tower.Value = v.Name
	script.Parent.ImageLabel.Image = v.Icon
	script.Parent.ImageLabel.TextLabel.Text = v.Name
	script.Parent.desc = v.Desc
	script.Parent.dmg = v.Dmg
	script.Parent.rel = v.Rel
	script.Parent.bul = v.Bullets
	local cost = "<font color=\"#8000ff\">"..v.Cost.." PC</font>"
	script.Parent.ImageLabel.TextLabel.Text = v.Name.." - "..cost.."."
		script.Parent.Buy.Visible = true
		print(v.Name)
	end)
end

And, of course, it would be funny not to show content of “Shop”


…where you can CLEARLY see my HORRIBLE sorting skills and “desc” is in.
By the way, the script running in that LocalScript that I shew on screenshot.

Thank you for helping, even if you will try to!

1 Like

Instead of script.Parent.desc = v.Desc, try this so that it edits the text:

script.Parent.desc.Text = v.Desc

You will also need to do this to the following lines by adding .Text because they are also all TextLabels

3 Likes

thank you for fixing the issue…!
its night here and i was too sleepy to put .Text

2 Likes