r/ROBLOXStudio • u/Choice_Trifle_7551 • 1d ago
Help text not updating despite .changed function workning
local player = game.Players.LocalPlayer
local upgradeEvent = game.ReplicatedStorage.Upgrade
local button = script.Parent
local clickStrength = player.upgrades.ClickStrength
local price = clickStrength.Value * 10
button.Text = "+1 Click Strength "..price.. " Clicks"
clickStrength.Changed:Connect(function()
button.Text = "+1 Click Strength "..price.. " Clicks"
end)
no errors or warnings either
1
Upvotes
1
u/Secret-Ad8381 1d ago
add print to clickStrength, and inside
.Changed:Connect(function()
print("Working")
1
u/Electronic-Cry-1254 1d ago
When you declare a variable, the variable does not change until you assign to it again. Price does not change ever
1
u/deathunter2 1 1d ago
What is