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

Where to save values?

Asked by
Zerio920 285 Moderation Voter
10 years ago

If I generate some values in a script, where would be a good place to store them for later use? The values are Vector3's (Positions), and I'm storing them to be used as a path for a humanoid character after they're generated.

0
Be more specific -- what are the values? What do you use them for? What do you mean by "store"? What is the later use? (Edit your question please) BlueTaslem 18071 — 10y
0
Okay, done. Zerio920 285 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

If it's more than one value, store them in a table like so:

local PointsTable = {
    Vector3.new(10, 10, 10),
    Vector3.new(20, 20, 20),
}
0
Is this in the same script that the points are being generated in? How do I insert new points into the table? Zerio920 285 — 10y
0
Sorry for taking so long to reply, but yes, it's in the same script. Insert new points like so: table.insert(PointsTable, Vector3.new(20, 20, 20)) DevJackB 55 — 10y
Ad

Answer this question