How can I merge Mousebutton1click:Connect(function() With other functions?

My problem is that I think I should merge those two because if not, it does not detect the value of a string Value

StringValueObject:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.MouseButton1Click:Connect(function()

Could you please explain what you are exactly trying to do?

Like, do you want to make it that when the property changes, detect when it gets clicked? Or something like when you click detect for a property change? Or something else.

Let me explain, a dataStore Script, when data arrives that change something to save it, it changes a Value of a StringValue and another script should detect it.

And what does the button do? Is it something like a save button?

I explain more in depth. clicking a textButton changes a value, and that value is detected by another textButton that sends it as a Fire signal saving the data and doing what I said before.

So the button gets clicked, a value increases which is detected by another script, firing to the server to save it, and then when that happens a string value changes?

good. To the case. I have another dataStore script that works the same way (You see that in games there is an options menu, right?) I have a “General” section that saves the configuration

in the general one, it does work correctly and in the one I said previously, it doesn’t.

In that case can’t you just use GetPropertyChangedSignal on the value you are saving and then change the string value accordingly, or is there something I am missing here?

I already tried that, I don’t know if I explained it well but my problem is that after pressing the save data menu, the button no longer works.

Hm…
Would you mind showing your scripts & your explorer?

Wait a minute I think I already found the problem.

Oh ok…

Just make sure to check thoroughly always lol.

1 Like