Script doesn't receive changed event

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.

3 Likes

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.

5 Likes

I believe I made it clear, but oh well.

The script doesnt receive when a boolvalue’s value changes.

2 Likes

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?

Can you give us some of your code? It’s hard to figure out the problem you may have written it wrong.

1 Like

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)

For some reason it didn’t work in that exact script. Made a new one and it worked fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.