Regenerating Objects at the Click of a Button - Printable Version +- 2DWorlds Forums (http://2dworlds.buildism.net/forum) +-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4) +--- Forum: Help (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=21) +--- Thread: Regenerating Objects at the Click of a Button (/showthread.php?tid=3362) |
Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011 On my drinks making game, there are two regenerating buttons- one to regenerate the cup (which works), and one to regenerate the Ingredients (which doesn't work). I've checked the scripts, they are both the same (aside from the model name, of course) but only one works. The model name in the "world" is the same as the model name stated in the script. Anyone got any help? RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011 Post the script please? :3 Oh, and you should post these topics to Scripting Oh, and if you dont want to publish the script, just send me a PM D: RE: Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011 1. Okay 2. No, It's in help cos' I need help. 3. Nah, I'll post it here, just lemme get it RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011 Scripting Get scripting help here, and post your scripts. Scripting is for everything with scripting. That includes help topics (Get scripting help here...) :3 Help is for everything else xD RE: Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011 model = game.World.Ingredients message = "Rebuilding..." backup = model:clone() enabled = true link(script.Parent.Clicked, function(player, btn) if not enabled then return end enabled = false script.Parent.Color = Color(127, 127, 127) local copy = backup:clone() model:remove() game:message(message) sleep(2) game.TaskSchedulerchedule(function() copy.Parent = game.World copy:makeJoints() end) model = copy game:message() sleep(3) enabled = true script.Parent.Color = Color(0, 102, 255) end) (04-15-2011, 08:17 PM)Anti Wrote: Scripting K, K, whatever XP RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011 I dont think that the ingredient parts are actually in Ingredients model... >_> Oh, and when you regen the cup, the items in it will just fall down, but wont get removed RE: Regenerating Objects at the Click of a Button - Sazaho - 04-16-2011 The ingredients are part of a model, named Ingredients. And yah, I have to work on that too |