Hi
So I was working on a horror game and I got a problem...
Entire script works and it prints out 1/2 but one and two variables which are boolion values variables don't change.
Bascially whole script is working but the boolvalues (true/false) aren't changing
game.ReplicatedStorage.AddChildren.OnServerEvent:Connect(function(player, num, val)
local value = tostring(num)
local one = game.Workspace.Children1
local two = game.Workspace.Children2
if num == 1 then
if val == true then
print("1")
one.Value = true -- this isn't working for some reason
elseif val == false then
print("2")
one.Value = false -- this isn't working for some reason
end
elseif num == 2 then
if val == true then
print("1")
two.Value = true -- this isn't working for some reason
elseif val == false then
print("2")
two.Value = false -- this isn't working for some reason
end
end
end)
There are no errors on the output.

4 comments
Is this a local or normal script?
server sided / normal
Are there any errors and are you sure that the Instance is a boolean value and not any other value
There are no errors as I said in the post and yes, I am scripting for 2 years so far and it's not my first time dealing with that problem and I still have no idea why is that happening.