im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 15 Nov 2011 08:09 PM |
Hi, ive got this bit of script and its in a tool. It is supposed to "craft" items into something new when you equip the tool, but, i cant seem to get that working. Here it is:
function equipped(mouse)
local Obj1 = Player.Backpack:findFirstChild("Megaphone") local Obj2 = Player.Backpack:findFirstChild("Gunpowder") local Obj3 = Player.Backpack:findFirstChild("Pile of Plasma")
if Obj1 ~= nil and Obj2 ~= nil and if Obj3 ~= nil then Obj1:remove() Obj2:remove() Obj3:remove() game.Lighting.PlasmaPistol:clone().Parent = Player.Backpack end end)
Hope someone can help! Thanks!
|
|
|
| Report Abuse |
|
|
|
| 15 Nov 2011 08:18 PM |
Need to connect the function.
script.Parent.Equipped:connect(equipped) |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2011 08:32 PM |
| and you'll need to remove the ")" after "end", and remove the extra "if" before obj3 ~= nil |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 15 Nov 2011 08:43 PM |
| If i need to add that to the very bottom of the script, its not working. |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 15 Nov 2011 08:46 PM |
| techepic, i also tried doing that, its still not working :P |
|
|
| Report Abuse |
|
|
| |
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 15 Nov 2011 09:11 PM |
| Oooh.. i just noticed that. I really dont know how to define it. Like script.Parent.Player or something? :/ |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
| |
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
| |
|