So I was working on my clicker game when I ran into an error saying, "attempt to index string with 'Text' and here is the code
local moreRebirthButton = script.Parent
local infoHolder = moreRebirthButton.Parent.Parent.info
local price = infoHolder.Frame.TextLabel
local upgradeInfo = infoHolder.info
local upgradeName = infoHolder.Name
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local upgradesFile = player:WaitForChild("upgrades")
moreRebirthButton.MouseButton1Up:Connect(function()
local rebirthsButtonData = upgradesFile:WaitForChild("rebirthButtons")
upgradeInfo.Text = "This will give you a boost!"
upgradeName.Text = "Rebirth Buttons"
price.Text = ((10)+(rebirthsButtonData.Value*10)).."Gems"
if infoHolder.Visible == false then
infoHolder.Visible = true
end
rebirthsButtonData.Changed:Connect(function()
price.Text = ((10)+(rebirthsButtonData.Value*10)).."Gems"
end)
end)~~~~~~~~~~~~~~~~~
Help will be great
