kot100
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 129 |
|
|
| 21 Jan 2014 04:15 AM |
I want to add this scripted weapon to my game http://www.roblox.com/forum/showpost.aspx?postid=72239721 but when I add it to workspace, automatically first player that joins gets this weapon. So my question is, can someone modify this script to set who receives this weapon, please? |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 21 Jan 2014 04:21 AM |
game.Players.PlayerAdded:connect(function(plr) local ToolName = ToolNameHere local PlrName = PlayerNameHere if plr.Name == PlrName then game.Lighting.ToolName:Clone().Parent = plr.Backpack end end) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 21 Jan 2014 04:21 AM |
| I didn't even look at the script, to tired, here's a new one. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 04:49 AM |
| Its a local script, so only you would get the item. |
|
|
| Report Abuse |
|
|
kot100
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 129 |
|
|
| 21 Jan 2014 05:11 AM |
How do I use this? game.Players.PlayerAdded:connect(function(plr) local ToolName = ToolNameHere local PlrName = PlayerNameHere if plr.Name == PlrName then game.Lighting.ToolName:Clone().Parent = plr.Backpack end end) Do I have to add it at end of the knife script or add another script inside knife script and paste it here?
@Immortalibus Mostly I want to prevent people to get this weapon when they spawn so I can get something like admin weapon. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 21 Jan 2014 05:27 AM |
| Nevermind. The knife script is a scripted tool, unless you want to go through all of that code to find the one spot where it says 'script.Parent = ...' and change '...' to game.Lighting then sorry. |
|
|
| Report Abuse |
|
|
kot100
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 129 |
|
|
| 21 Jan 2014 05:40 AM |
| Changed it to game.Lighting and when I join my game I don't get any knife, in test mode it works, also I want to make it don't disappear from my backpack when I die. |
|
|
| Report Abuse |
|
|
kot100
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 129 |
|
|
| 21 Jan 2014 06:43 AM |
| I did it with weapon giver, and made admin room with this giver, thanks for trying to help. |
|
|
| Report Abuse |
|
|