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

How to use script as a value in a table?

Asked by 4 years ago

I want to make a table with a script name and the code as the value then use a i,v loop to do something with it, but when I use the script it only prints "a" (from the table and not the loop) I'm not sure how I can make this work.

local scripts = {
    ["Script"] = print("a"),

    }

for name, value in pairs(scripts) do
    print(name, value)
end
0
you set speedyfox66 237 — 4y
0
you set "script" to a speedyfox66 237 — 4y
0
Can we talk this over discord to get a better idea of what you're trying to do? Lucy#0003 royaltoe 5144 — 4y
0
In this case, why not use modules for each set of script you want? Shawnyg 4330 — 4y
View all comments (2 more)
0
I don't use discord sorry... And for the modules, I'm trying to make an easy script executer and have the scripts as an easy way to paste it into the textbox for executing or editing. GreenBushed 13 — 4y
0
I couldnt really understand, are you trying to make it print script and a? AntoninFearless 622 — 4y

Answer this question