Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so a player could actually win and then the round ends?

Asked by 2 years ago

Well I have a script, and I can see if a player wins but I don't know how to make the round en because they are in for loops and the idea of this confuses me.

RoundModule.GrabPlayers(function(Player, Character, ...)
        if not RoundModule.CheckAFK(Player) then
            Character.Humanoid:UnequipTools()

            local SwordClone = Sword:Clone()
            SwordClone.Parent = Character    

            Player.Values.isPlaying.Value = true

            if Player.Values.isPlaying.Value == true then
                InGame[Player.Name] = Player
            end

            Character.Humanoid.Died:Connect(function()
                InGame[Player.Name] = nil
                Player.Values.isPlaying.Value = false

                if #InGame == 1 then
                    print('winner')
                end
            end)
            print(InGame)
        end        
    end)

Answer this question