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

How can I change two separate variables using a for loop?

Asked by
wddfrt 21
3 years ago

So basically I want to update a variable to a GetAsync Value with a for loop. How would I go about doing this?

local hours
local minutes
local vibepoints
local gamepass
local twoxvibe

local fortnite = {"-hours", "-minutes", "-vibepoints", "-gamepass", "-twoxvibe"}

local success, errormessage = pcall(function()

    for i, v in pairs (fortnite) do

    blank = DS:GetAsync(player.UserId..""..v)

    end

end)

I want to have v be the strings stored in the table fortnite, but I also want the for loop to change blank into one of the variables on the top of the script every time it loops. Any help would be appreciated, or maybe even an alternative way of doing this.

Answer this question