Attempt to call a string value error for surfacegui text

Recently tried implementing attributes via boolean values into the config folders of my tycoon buttons so that I could change what it said players were buying if needed (the attribute is supposed to change the overhead surface gui text) but for whatever reason this specific line refuses to work:

image
image

Tried checking if I made any typos that could’ve posed the problem but found nothing and I’m almost certain the heirarchy of things is correct. For context:
image

local config = script.Parent.Parent.Configuration
local realprice =  script.Parent.RealPrice
local customname = config.CustomUIText:GetAttribute("CustomText")
local buytargetname = config.ObjectName.Value
if config.CustomUIText.Value == false then
		print(script.Parent.Parent.Name.." has custom text disabled")
		text1.Text = ("Buy "..buytargetname.." for "..realprice.Value)
		text2.Text = ("Buy "..buytargetname.." for "..realprice.Value)
	else
		text1.Text(customname.." for "..realprice.Value) -- error
		text2.Text(customname.." for "..realprice.Value)
	end
end

This code is all loaded as part of a module function into “Button Script”. If anyone could help solve this I would appreciate it.

Shouldnt there be a = sign here?

text1.Text = (customname.." for "..realprice.Value)
1 Like

oops, you’re right. Don’t know how I didn’t see this but thank you!