Attribute variable somehow not working?

Hi everyone. I’m trying to make a modulescript for tycoon buttons I’m putting together for my game, albeit being new to modulescripts and I’m trying to think of a way on how I’m going to reference one of the boolean values from the config folders (that are located in buttons) to correctly determine if a button needs to display custom text from the billboard gui for players to see instead of a general and basic concatenation method (e.g, “buy modelname for $$$” needs to be “construct a teleporter connecting to earth for $$$” instead for grammatical/context purposes).

This is what I’ve came up with so far in the module function being called, but it isn’t working even though there’s no errors being reported in the output:

function module.onTouched(script, hit)
    
    local debounce = script.Parent.Purchased.Value
	local realprice = script.Parent.RealPrice.Value
	
	local config = script.Parent.Parent.Configuration
	local buytargetname = config.ObjectName.Value
	local customname = config.CustomUIText:GetAttribute("CustomText")
	local checkpoint = config.Checkpoint.Value
	
	local cmin = config.ButtonNumMin.Value
	local cmax = config.ButtonNumMax.Value

	local text1 = script.Parent.Parent.TextGui.Text1Sur.Text
	local text2 = script.Parent.Parent.TextGui.Text2Sur.Text

    if config.CustomUIText.Value == false then
		print(script.Parent.Parent.Name " has custom text disabled")
		text1.Text = ("Buy "..buytargetname.." for "..realprice)
		text2.Text = ("Buy "..buytargetname.." for "..realprice)
	else
		text1.Text(customname.." for "..realprice)
		text2.Text(customname.." for "..realprice)
	end
-- rest of code
end

As for the test button script:

local text1 = script.Parent.Parent.TextGui.Text1Sur.Text
local text2 = script.Parent.Parent.TextGui.Text2Sur.Text

local buytargetname = script.Parent.Parent.Configuration.ObjectName.Value
local realprice =  script.Parent.RealPrice

text1.Text = ("Buy "..buytargetname.." for "..realprice.Value)
text2.Text = ("Buy "..buytargetname.." for "..realprice.Value)

realprice:GetPropertyChangedSignal("Value"):Connect(function()
	text1.Text = ("Buy "..buytargetname.." for "..realprice.Value)
	text2.Text = ("Buy "..buytargetname.." for "..realprice.Value)
end)

local module2 = require(game.ServerScriptService.ButtonModule)
script.Parent.Touched:Connect(function(hit) 
	module2.onTouched(script, hit) 
end)

Test button that isn’t changing based on module function called:
image

If anyone could give some assistance on how to fix this it would be greatly appreciated.
edit: updated post title for better clarification

I suggest you read up on how to use custom attributes. You need to use object:GetAttribute(name). Also, if you are using values, why not just use a string value, then you don’t need attributes.

I suggest you read up on how to use custom attributes. You need to use object:GetAttribute(name)

… Well I did use that already for my customname variable in my module function, and like I stated before, it didn’t work. I also already tried looking around for information on attributes (and even went onto the roblox documentation page for it again) and didn’t find anything noteworthy that was preventing this from working, AFAIK. Which is why I made this post, asking for help. As for using attributes instead of string values my intention is to increase small amounts of performance over time.