phorofor
|
  |
| Joined: 15 Feb 2010 |
| Total Posts: 3986 |
|
|
| 25 Apr 2014 09:50 AM |
| I want to make a script where when I join a game it gives me a rocket launcher from Lighting but to no one else. I am very new at scripting so if someone could provide the script it would be extremely helpful. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 09:52 AM |
Use server storage.
game.Players.PlayerAdded:connect(function(player) if player.Name == "" then game.ServerStorage.ROCKET:Clone().Parent = player.BackPack end end) |
|
|
| Report Abuse |
|
|
phorofor
|
  |
| Joined: 15 Feb 2010 |
| Total Posts: 3986 |
|
| |
|
|
| 25 Apr 2014 09:56 AM |
I typed that on the forums so I hope you know enough to make the names correct e_e |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 09:56 AM |
Programming, use userId instead of name.
i.e
if player.userId == game.CreatorId then --etc.
#nerdsunited |
|
|
| Report Abuse |
|
|
phorofor
|
  |
| Joined: 15 Feb 2010 |
| Total Posts: 3986 |
|
|
| 25 Apr 2014 10:02 AM |
| @Verified like I said I am new to scripting could you post the script because I keep getting errors when I type that in. |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 25 Apr 2014 10:03 AM |
| Why always everyone puts now on server storage? I will always put things like that in Lighting. This post was nothing with thread. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 10:05 AM |
"Why always everyone puts now on server storage? I will always put things like that in Lighting. This post was nothing with thread."
Server storage is protected and MADE for this,
Lighting is not at all, it's basically parenting it to nil, but other scripts can get it. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 10:06 AM |
game.Players.PlayerAdded:connect(function(player) if player.userId == game.CreatorId then game.ServerStorage['ROCKETNAME']:Clone().Parent = player.BackPack end end)
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 10:07 AM |
game.ServerStorage['ROCKETNAME']:Clone().Parent = player:WaitForChild('Backpack')*
#nerdsunited |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
| |
|