A bool value that's stored in a part(workspace) is not changing on server

Hello, so I’m having trouble and don’t know if I’m doing this properly, Lemme explain

What I’m trying to do is…

in the client script when the player presses E and there close enough to the Mystery box then the mystery box opens and a boolvalue in that Mystery box changes to false

so if the mystery box is open already and another player tries to open it, nothing happens, and that player has to wait until the Mystery box closes and the boolvalue is back to true again

– CLIENT_________________________________SERVER -


btw I know I haven’t check if the value is true but in the output it shows its false but on the side there you can see its still true

2 Likes

I actually solved this problem on a thread yesterday, right here:

Basically, when you do local Var = BoolValue.Value, it only reads the value, so Var just ends up being false/true. To get around this, you can reference the BoolValue in your Variable, rather than it’s value like so:

local Var = BoolValue
Var.Value = true
1 Like

wooooooow I didn’t know it does that, but its fixed now thanks