I want to order these if
statements so it happens in this order, marked in the script provided
if played == true then -- for some reason this only works if i write == true
if starter == true then --when starter value == true only this should happen
terrain = workspace.maps.starter_bunker.terrain:WaitForChild("cubes"):GetChildren()
mapobj = workspace.maps.starter_bunker.obj:GetChildren()
spawnpos = workspace.maps.starter_bunker.spawns["1"]
spawnrot = spawnpos.rot.Value
print("Starter bunker being saved.")
else --When played is true and starter is false this should happen
terrain = workspace.maps[Player.Name].terrain:WaitForChild("cubes"):GetChildren()
mapobj = workspace.maps[Player.Name].obj:GetChildren()
spawnpos = workspace.maps[Player.Name].spawns["1"]
spawnrot = spawnpos.rot.Value
print(plr.Name.."'s bunker being saved.")
end
else --When played and starter is false, do this
terrain = workspace.maps.default_bunker.terrain:WaitForChild("cubes"):GetChildren()
mapobj = workspace.maps.default_bunker.obj:GetChildren()
spawnpos = workspace.maps.default_bunker.spawns["1"]
spawnrot = spawnpos.rot.Value
print("Default bunker being saved.")
end
Above is what I tried and even when starter
is true, it loads the default bunker instead of the starter bunker.