Need help with inserting player twice in the table

I’m trying to make a 2x chance gamepass, and I need help inserting players name twice in the table.

	local tablev = {}
	for i, v in pairs(game.Players:GetPlayers()) do
		table.insert(tablev,v)
		if (game:GetService("MarketplaceService"):UserOwnsGamePassAsync(v.UserId, ID)) then	

		end
print(v)
	end

help much appreciated!

You just need to add that insert statement again within the if block. Also, if it’s only the Player’s name, make sure you use v.Name.

for i, v in pairs(players) do
    table.insert(tablev, v)

    if user owns game pass then
        table.insert(tablev, v) -- insert the player again
    end
end

Just use table.insert again.

	local tablev = {}
	for i, v in pairs(game.Players:GetPlayers()) do
		table.insert(tablev,v)
        table.insert(tablev,v)
		if (game:GetService("MarketplaceService"):UserOwnsGamePassAsync(v.UserId, ID)) then	

		end
print(v)
	end

I’ve done it before, but when I try to print it, it shows player once :confused:

It would because you’re only print()ing player once. If you add a print() statement after every table.insert(), you’ll see it is working as expected.

	local tablev = {}
	for i, v in pairs(game.Players:GetPlayers()) do
		table.insert(tablev,v)
		if (game:GetService("MarketplaceService"):UserOwnsGamePassAsync(v.UserId, ID)) then	
			table.insert(tablev,v)
		end
		print(v)
	end

If the user has the badge, add him to the list again

@SilentsReplacement brilliant troll or funny mistake lol