|
| 18 Feb 2014 01:39 AM |
game.Players.PlayerAdded:connect(function(player) local found = game.Workspace.FindFirstChild("Shirt") if found then game.Workspace.found:Remove() end end)
I'm trying to remove the shirt when a player joins, but eh, I think I'm missing something. |
|
|
| Report Abuse |
|
|
Marolex
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 1785 |
|
|
| 18 Feb 2014 01:42 AM |
you need to remove shirt and shirtgraphic from the character
~TheScrub~ |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 01:56 AM |
| Okay, but how do I access the character? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2014 01:59 AM |
| Oops, it's :FindFirstChild, not .FindFirstChild. |
|
|
| Report Abuse |
|
|
Marolex
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 1785 |
|
|
| 18 Feb 2014 01:59 AM |
game.Players.PlayerAdded:connect(function(p) p.Character etc
~TheScrub~ |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 02:08 AM |
Like this?
game.Players.PlayerAdded:connect(function(player) local found = game.player.Character:FindFirstChild("Shirt") if found then game.player.Character.found:Remove() end end) |
|
|
| Report Abuse |
|
|
Marolex
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 1785 |
|
|
| 18 Feb 2014 02:12 AM |
you need to remove "roblox" from torso and "Shirt Graphic" from character.
~TheScrub~ |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 02:33 AM |
| Isn't Shirt Graphic for a Tshirt? |
|
|
| Report Abuse |
|
|
Marolex
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 1785 |
|
|
| 18 Feb 2014 02:36 AM |
Sorry, i thought you where trying to remove the tshirt
so yes, that script you mentioned previously would work.
~TheScrub~ |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 04:47 AM |
| Okay, thanks for the help. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 06:10 AM |
game.Players.PlayerAdded:connect(function(player) local found = player.Character.Shirt if found ~= then found:Destroy() end end)
--Try that! |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2014 06:19 AM |
Found an error in my own script;
game.Players.PlayerAdded:connect(function(player) local found = player.Character:FindFirstChild("Shirt") if found ~= nil then found:Destroy() end end)
--Try that! |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
| |
|
| |
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 18 Feb 2014 01:32 PM |
| Player added doesn't work in play solo |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 11:38 AM |
| I've tried it in online mode too, nothing. |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 11:41 AM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() local found = player.Character:FindFirstChild("Shirt") if found ~= nil then found:Destroy() end) end end)
#LogicMakesSense |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 11:44 AM |
I think the problem is you are looking for the shirt before it loads. Two possible solutions:
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local found = player.Character:FindFirstChild("Shirt") if found then found:Destroy() end end)
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character local found = player.Character:FindFirstChild("Shirt") if found then found:Destroy() end end) |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 21 Feb 2014 11:51 AM |
| Idiots everywhere .-. Hint: for loop and class name |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 03:50 PM |
@King And now I feel completely stupid.
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() for i, v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") then v:Destroy() end end end) |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 04:11 PM |
| Yeah,but still should use .CharacterAdded so the shirt thingll happen every time,instead of only once |
|
|
| Report Abuse |
|
|