|
| 14 Jul 2011 04:48 PM |
Can you add something to a table for a certain period of time? Like Debris, you make a part...
p = Instance.new("Part") Debris:[Forgot this function](p,10)
So, can you do that with a table? Or anything besides debris? |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 14 Jul 2011 04:56 PM |
Table = {}
p = Instance.new("Part") Table[p] = true wait(10) game:GetService("Debris"):AddItem(p) Table[p] = nil |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
|
| 14 Jul 2011 04:57 PM |
Metatables.
T = {} X = { __newindex = function(t,i,v) wait(TIME) t[v] = nil end} setmetatable(T,X) |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 14 Jul 2011 04:58 PM |
Hey, it works.
The poster of this thread just needs to figure out what he is really trying to do. I doubt you need coroutines to solve a simple problem like this. |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2011 04:58 PM |
| Above script is messed up, but you get the purpose. |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
| |
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
| |
|
|
| 14 Jul 2011 05:16 PM |
| Metatables are common sense. |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2011 05:17 PM |
| If it helps, i need to know this because im making an RPG, with status effects. I need them to be there inflicting whatever for a certain time, then get removed. Or i could mess up the game and have everyone just use Remedies. |
|
|
| Report Abuse |
|
|