3DSPuppy
|
  |
| Joined: 26 Mar 2012 |
| Total Posts: 17146 |
|
|
| 26 Sep 2016 04:15 PM |
im trying to make a script to give certain people a gear but im bad at scripting here is what a currently have
local coolkid = game:GetService("Players"):GetPlayerByUserId(25178041,87945963,7122198)
local tool = game.ServerStorage["ice cube2"]
function onPlayerSpawned(player) if coolkid then wait (0.3) tool:Clone().Parent = player.Backpack else return end end
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() onPlayerSpawned(player) end) end)
|
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 26 Sep 2016 04:17 PM |
replace tool:Clone().Parent = player.Backpack
with
tool:Clone().Parent = game.Players.LocalPlayer.Backpack tool:Clone().Parent = game.Players.LocalPlayer.StarterGear
Lol'd >Add 5k posts, R.I.P. ROBLOXBaseWarsFPS1 |
|
|
| Report Abuse |
|
|
32_k
|
  |
| Joined: 24 Feb 2016 |
| Total Posts: 2869 |
|
| |
|
3DSPuppy
|
  |
| Joined: 26 Mar 2012 |
| Total Posts: 17146 |
|
|
| 26 Sep 2016 04:26 PM |
| doesn't seem to be working |
|
|
| Report Abuse |
|
|
DevObject
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 7048 |
|
|
| 26 Sep 2016 04:26 PM |
Hold up, I'll re-write the script gimmie a minute
Lol'd >Add 5k posts, R.I.P. ROBLOXBaseWarsFPS1 |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2016 04:41 PM |
local people = {"player1","EastJesusNowhere"}
local tool = game.ServerStorage["ice cube2"]
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() for _, z in ipairs(people) do if player.Name == z then tool:Clone().Parent = player.Backpack end end end) end)
put this in a serverscript.
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Sep 2016 04:43 PM |
local ids={984325,4385890123,328519023,239817598182398512398} game.Players.PlayerAdded:connect(function(p) for _,v in ipairs(ids)do if p:GetPlayerByUserId(v)then game.ServerStorage["ice cube2"]:Clone().Parent=p.StarterGear break end end end) |
|
|
| Report Abuse |
|
|
3DSPuppy
|
  |
| Joined: 26 Mar 2012 |
| Total Posts: 17146 |
|
|
| 26 Sep 2016 04:48 PM |
okay that seems to work thanks |
|
|
| Report Abuse |
|
|