How can I make my Value Update a parts property if it is true?

So basically I want a Value to Update a Parts Propertys if the value gets set to true. it wont update the value all tho the value is set to true and idk how to make it happen. this it a part of the script i am using (also the values definition since it might be smth right there):

if player.leaderstats.Coins.Value >= v.Config.Price.Value then
					remotes.Purchase:InvokeServer(player, player.leaderstats.Coins.Value)

					remotes.Purchase.OnClientInvoke = function(player, GateValue)
						if GateValue == true then
							
							
							v.CanCollide = false
							v.Screen.PriceText.Visible = false
							v.Screen.NameText.Visible = false
							v.Screen.PurchaseButton.Visible = false
							v.Transparency = 1
							
						end
					end
				end
1 Like

that was a preaty fast response all tho i didnt attach any script

Yeah, to be honest people get surprised that I know so many things when I’ve only been scripting for like half a year lmao.

Anyways if you think that was the solution you can mark it, so that other people will know what to do if they wanna check if a property has changed.

true hahaha but i am talking about the fact that it took 1 minute for a response also if it sometimes takes up to 20h which cam be preaty annoying since people like me want to continue fast yk?

I will read through the article tho and see if its the solution but let me attach my script jkust in case it isn’t

Yeah i’m active, I love the community that’s why. Even though some people can tick me off sometimes.

I’m not active in THAT way fyi

alright lol, but the thing from above wasn’t the solution sadly or i am just a little too stupid to get the right thing but i also attched the code above if you don’t mind quickly seeing what i ment :slight_smile:

the script is a local script just in case you wanna ask it some where lol

-- Server script
part:GetPropertyChangedSignal("PropertyName"):Connect(function()
-- Do your code here
end)

Already tried that but it didn’t work smh since it is a local script for client

That’s probably because you’re updating the value from the client, if you are then you should update from server so that the server knows the value actually exists. Because on the server the client changed value won’t exist.

So i should add the property changed thing before the event gets fired with the value? If so, then i know what you saying

Well I guess you could, but what I’m trying to say is that you need to change the value and use the event on the same client-server boundary. So if you changed it on the client, do the event on the client. If you changed it on the server, well it would work. But I assume the reason it doesn’t work for you is because you have changed the value from the client. Then you’re invoking to the server, which doesn’t know that the value even exists.

You have any article on this one? Kinda confusing what u r saying because i am still learning scripting and i am just confused tbh

Alright,
well let’s start again. Show me your updated code with the :GetPropertyChangedSignal Event.

I can show tmrw gotta sleep now bc i am fairly tired. Sorry :frowning:

Alright that’s fine, you need rest anyway.

didn’t do taht since now it doesnt even do anything.

Ok, show me where you are making the value true. Is it in a local script, or server?

i am making the value in server true since its way more secure and exploiters can’t manipulate anything

And where are u using getpropertychangedsignal? Can you provide your code current aswell?