|
| 29 Jun 2017 10:38 PM |
I am trying to create a tweening model loader, meaning, a script that tween positions and sizes all the parts and unions into the original position for a cool loading animation sequence.
But I am stumped on how to add parts to a table so they cannot be :cloned() and tweened more than once.
Soo far, just starting but I can't get much further without this main function that I need your help with.
local tweenservice = game:GetService("TweenService") local parts = script.Parent.Parent:GetChildren('UnionOperation', 'Part') local selected = parts[math.random(1,#parts)] selected.Name = math.random()..selected.Name -- I don't know how to add names to a table... zzz
I know HOW to tween one thing, but doing multiple ones simultaneously without overlapping is something I am unfamiliar with.
Help? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 29 Jun 2017 10:58 PM |
GetChildren doesn't take arguments. Also, why are you concatenating the Name with a random floating point number? |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 10:59 PM |
That bunch of junk was me testing around mindlessly, I really just need to know the specific as to how to add to a table, been looking everywhere in wiki and Youtube and haven't found much yet.
Do you know how? |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:00 PM |
| And then of course, after adding to the table, having it so that it doesn't add that same part again. |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:01 PM |
names = {} table.insert(names,selected.Name) |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:03 PM |
..and latepost.
names = {} --- local b = true for _,v in next,names do if v == selected.Name then b = false break end end if b then table.insert(names,selected.Name) end |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:03 PM |
| What about an if statement to check it? Not sure how that would work either with a table. |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:04 PM |
| Damnit lol didn't see that last one, thanks. |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2017 11:06 PM |
Hey since you're here and you're knowledgeable can you answer this post too? https://forum.roblox.com/Forum/ShowPost.aspx?PostID=219883507 I fixed the script and advanced it, but I still don't understand what is the causeality for localscript, modulescript, and script working in different play modes and then not working in others. |
|
|
| Report Abuse |
|
|