How can I make a script that looks through every player's Character and if the script finds a Bool Value inside the player's Character Model then they get teleported to a destination and if the script doesn't find any Bool Value in everyone else, then the ones that didn't have a Bool Value get teleported to a different destination.
Ok, I am a bit rusty with this kind of stuff but you basically need to loop through every player and retrieve their character from the player and see if there is a bool value inside. After that just set the primary part cframe and it should work :D
for i,player in pairs(game.Players:GetPlayers()) do print("player") local character = player.Character if character then print("character") local playerbool = character:FindFirstChild("PlayerBoolValue") if playerbool then if playerbool.ClassName == "BoolValue" then print("boolfound") character:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,0,0))) -- Vector3.new(0,0,0) should be the position you want the character to be or a part.Position end end end end