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

Increased chance gamepasss?

Asked by 10 years ago

Hi there! I am trying to make an increased chance gamepass! My idea was that if they have the gamepass it puts you in the table in twice, but this doesn't work and i'm not really sure! The line that i think is broken is list = list + v + v Any help will be great! Thanks!


function ChoosePlayers() local list = {} local id = 103728213 for i,v in pairs(game.Players:GetPlayers()) do if Game:GetService("GamePassService"):PlayerHasPass(v, id) then list = list + v + v -- if they have the gamepass, put them in the table twice else list = list + v -- if they don't have the gamepass just put them in once end end end

1 answer

Log in to vote
0
Answered by
wazap 100
10 years ago
function ChoosePlayers()

    local list = {}

    local id = 103728213

    for i,v in pairs(game.Players:GetPlayers()) do
    table.insert(list, v)--everyone is inserted once
        if Game:GetService("GamePassService"):PlayerHasPass(v, id) then
        table.insert(list, v)--again if they have the pass
        end

    end

end


0
How did i get the -1 ._. wazap 100 — 10y
Ad

Answer this question