|
| 09 Apr 2014 09:28 PM |
script.Parent.MouseButton1Click:connect(function() p = script.Parent.Parent.Parent.Parent.Parent.Parent pn = p.Name wp = game.Workspace:findFirstChild(pn)
if script.Parent.Text == ("[Sword]") then script.Parent.Visible=false for i = 1,#players do game.Lighting.Sword:clone().Parent = p.Backpack end end end) |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2014 09:32 PM |
| The button dissappears, but the sword doesn't enter my backpack. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 09 Apr 2014 09:34 PM |
Make sure this is in a local script and Sword is a tool in lighting.
script.Parent.MouseButton1Click:connect(function() if script.Parent.Text == ("[Sword]") then script.Parent.Visible = false game.Lighting.Sword:Clone().Parent = game.Players.LocalPlayer.Backpack end end) |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2014 09:35 PM |
| It's supposed to go into every player in the game's backpack. Hence the 'for i = 1,#players' |
|
|
| Report Abuse |
|
|
| |
|
| |
|