In the game I am currently working on, the lobby disappears and the map exists. When this happens, a value is supposed to change to true so it doesn't continue to go and just break. For some reason, the if statement says the bool is false even if it isn't. This only started happening after I added the 2nd script (the one at the bottom of the page). If anyone knows what's going on, please help me out and leave an answer. Thanks.
local RS = game.ReplicatedStorage
local Workspace = game.Workspace
local ss = game.ServerStorage
local value = Workspace.Trueorno.Value
while true do
wait(1)
print("still going")
if game.Players.NumPlayers >= 1 then
if value == false then
wait(9)
game.Workspace.Trueorno.Value = true
wait(1)
for i,Player in pairs(game.Players:GetPlayers()) do
local Dagger = RS.DaggerWood:Clone()
Dagger.Parent = Player.Backpack
end
RS.Map1.Parent = Workspace
Workspace.Lobby.Parent = RS
end
end
print("no")
end
while true do
wait(3)
if game.Workspace.Trueorno == true then
print("1true")
if game.Players.NumPlayers == 1 then
print("2true")
game.Workspace.Trueorno = false
game.Workspace.Map1.Parent = game.ReplicatedStorage
game.ReplicatedStorage.Lobby.Parent = game.Workspace
end
end
end

1 comment
And by the way, the value does change. The script just doesnt think it did.