What the title says. Would it be possible to have 1 element of a table use another elements value like this
local table = {
Endurance = 0.85,
Stamina = Endurance*100
}
1 Like
why don’t you just make a separate variable outside the table
2 Likes
local table = {}
table.Endurance = 0.85
table.Stamina = table.Endurance*100
1 Like
I could do that, I’m just wondering if there is a way where I could somehow do it within the same table
2 Likes
Not in an efficient way.
Why do you need it to be in the table anyways?
1 Like
Its mostly just in case I want to change the stamina values later without increasing endurance(These stats are going to be saved in a datastore too)
1 Like
You shouldn’t need a table for that,
local endurance = 0.85
local stamina = endurance * 100
should work.
1 Like
These values are DataStore Values but thanks anyway
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.