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.