|
| 27 Jun 2013 10:41 AM |
c=game.Workspace.trov:clone() c.Parent=game.StarterPack
Why isn't it showing up? |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Jun 2013 10:46 AM |
Place your tool in lighting then use this script and make your tool named "trov" I guess.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:wait() if plr.Character then game.Lighting.trov:clone().Parent = plr.Backpack end end)
ʟᴇʟᴇʟᴇʟ (ง'̀ ͜ʖ'́ง) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 10:46 AM |
What I just scripted is exactly what would happen when you just put the tool in starterpack and not even use any scripts.
ʟᴇʟᴇʟᴇʟ (ง'̀ ͜ʖ'́ง) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 10:47 AM |
When you reset, does it show up?
Just putting it into the game.StarterPack will make it available to all characters when they respawn. If you want to give it to only one player, you need to put it into the Player's backpack. This can be done easily by using a touch function.
script.Parent.Touched:connect(function(hit) t = game.Workspace.trov:clone() t.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).Backpack end)
I believe that would work. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 10:52 AM |
Actually it would be:
script.Parent.Touched:connect(function(hit) t = game.Workspace.trov:clone() --(I'd recommend putting trov into Lighting instead) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not Player then return end t.Parent = player.Backpack end) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 10:57 AM |
t = game.Workspace.trov:clone() t.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).Backpack
That can be shortened since it won't be needed access later on, I'm assuming.
workspace.trov:clone().Parent = blaghblahblah
ʟᴇʟᴇʟᴇʟ (ง'̀ ͜ʖ'́ง) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 11:30 AM |
Acutally, it is needed to check that a character is touching, and not something else (such as a hat or a tool). In fact, the script should really be:
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not Player then return end t = game.Workspace.trov:clone() --(I'd recommend putting trov into Lighting instead)t.Parent = player.Backpack end)
If a tool or hat touches the part, this way the script won't glitch out. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 11:31 AM |
Gah, a line ran together XD
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not Player then return end t = game.Workspace.trov:clone() --(I'd recommend putting trov into Lighting instead) t.Parent = player.Backpack end) |
|
|
| Report Abuse |
|
|
iceywind
|
  |
| Joined: 10 Aug 2009 |
| Total Posts: 4424 |
|
|
| 27 Jun 2013 11:37 AM |
c = game.Lighting.trov:clone().Parent = game.Players.LocalPlayer.StarterGear
--you may have to change StarterGear to Backpack
--By IceyWind
|
|
|
| Report Abuse |
|
|
iceywind
|
  |
| Joined: 10 Aug 2009 |
| Total Posts: 4424 |
|
|
| 27 Jun 2013 11:38 AM |
Guys, he wants the players to SPAWN with the weapons/tools, not touch a brick to get them.
~IceyWind |
|
|
| Report Abuse |
|
|