so i made a script that simply just changes boolsvalue's value when button is clicked. for some reason it doesnt work. heres the script: im not getting any errors tho
local button = script.Parent
local debounce = true
button.MouseButton1Click:Connect(function()
if debounce then
debounce = false
if button.On.Value == false then
button.On.Value = true
button.TextButton.TextLabel.Text = "Transparent Ores (Optimize Lag) : On"
elseif button.On.Value == true then
button.On.Value = false
button.TextButton.TextLabel.Text = "Transparent Ores (Optimize Lag) : Off"
end
wait(5)
debounce = true
end
end)
any help appreciated!

7 comments
Try pcalling it and let me know what happens.
Is this a local script? You can only change values with a server sided script, so if this is the case then that is the error.
its a normal script, ill try to pcall it
nothing
nothing happens
There is nothing wrong with your script as far as I can see, maybe you disabled the script
I tested out your code and it worked just fine for me. Try to spread out your buttons/labels to verify you're clicking the right one and seeing the right text label.