Recently I’ve had an issue that has blocked all progress on my games, and I’ve tried way too many solutions and none of them work, so I’ve come for help.
For some reason, my script located in ServerScriptService doesn’t receive when a boolvalue, or any value for that matter, changes. I’ve tried placing the values in serverstorage, replicatedstorage, even SSS itself. I’ve even tried coroutines. Nothing works.
I beg you all, if there is a fix or an answer to this, please tell me. I’m at a loss.
Please provide more details to your query. “It doesn’t work” makes it difficult for us to pinpoint any issues with your code. There are too many factors to exactly know what’s causing this, without seeing any code or system organisation.
Have you made sure the values are changed on the server? If you change it in a local script then it’s obvious it doesn’t work since client changes don’t replicate to the server. You either should use remote events to change them server-sided or move the script to a local script (not recommended if you need changes on the server)
Also it is still not very clear, can you provide us a specific example, such as copying the script you need change detection here?
Make sure you change the value on server’s side. Also ensure you’re using the .Changed event to listen for changes on the BoolValue. Here’s an example of how to use it:
local myBoolValue = game.ServerStorage:WaitForChild("MyBool") -- or any other path
local function handleBoolChanged(boolValue)
print("BoolValue changed to: "..tostring(boolValue))
end
myBoolValue:GetPropertyChangedSignal('Value'):Connect(handleBoolChanged)