Droben
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 54 |
|
|
| 18 Aug 2013 09:22 PM |
shirtid = 1234 pantsid = 1234
game.Players.PlayerAdded:connect(function(Player) If p == "Character" then If player.Character then wait(1) local char = player.Character Instance.new.Object.Shirt Instance.new.Object.Pants
trying to make a script that spawns new clothing on the player when they spawn for a friend |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 09:25 PM |
Put into local script
shirtid = 1234 pantsid = 1234 player = game.Players.LocalPlayer
game.Players.PlayerAdded:connect(function(Player) If p == "Character" then If player.Character then wait(1) player.Character.Shirt:remove() player.Character.Pants:remove() local char = player.Character local shirt = Instance.new("Shirt",char) local pants = Instance.new("Pants",char)
That would be my guess but I dont know for sure |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 09:26 PM |
No no no, not today
das the power of ferbo engineering http://www.youtube.com/watch?v=JHAewy-1aDw&feature=youtu.be |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 09:28 PM |
| Dont know what I was thinking I didnt put shirtid or paintsid in... |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 09:31 PM |
shirtid = 1234 pantsid = 1234 player = game.Players.LocalPlayer
game.Players.PlayerAdded:connect(function(Player) If p == "Character" then If player.Character then wait(1) player.Character.Shirt:remove() player.Character.Pants:remove() local char = player.Character local shirt = Instance.new("Shirt",char) local pants = Instance.new("Pants",char) shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1234" pants.PantsTemplate = "http://www.roblox.com/asset/?id=1234" |
|
|
| Report Abuse |
|
|
Droben
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 54 |
|
| |
|
Droben
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 54 |
|
|
| 18 Aug 2013 09:43 PM |
| Wait are you sure that script will work? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Aug 2013 10:14 PM |
| Why on earth do you guys use :Remove() over :destroy()??? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:17 PM |
| I started scripting with remove, When it comes to Lua, Its like second nature |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:22 PM |
| I don't see how it would work at all if you didn't end the if statements (that shouldn't be capitalized) and the function. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 18 Aug 2013 10:22 PM |
Try this out.
local shirtId = 1234 local pantsId = 1234 Game.Players.PlayerAdded:connect(function(plr) plr.PlayerAdded:connect(function(char) local shirt = char:FindFirstChild('Shirt') or Instance.new('Shirt', char) local pants = char:FindFirstChild('Pants') or Instance.new('Pants', char) shirt.ShirtId = 'http://www.roblox.com/asset/?id='..tostring(shirtId) pants.PantsId = 'http://www.roblox.com/asset/?id='..tostring(pantsId) end) end) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:24 PM |
| ^ thats exactly what I did |
|
|
| Report Abuse |
|
|
Droben
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 54 |
|
|
| 18 Aug 2013 10:25 PM |
| Sorry, Im really confused. So I replace :remove() with :destroy() and add 4 ends? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:26 PM |
| You dont have to replace :remove() |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 18 Aug 2013 10:27 PM |
| @mad Yours gave me a headache it was so poorly written and incorrect. |
|
|
| Report Abuse |
|
|
Droben
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 54 |
|
|
| 18 Aug 2013 10:27 PM |
| Whoops! Didn't see the posts above |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:28 PM |
| @Ekkoh, Eh. I hadn't really red it over, Like I said I dont know if it will work. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:28 PM |
| It wouldn't have, how was that even remotely similar to Ekkohs? |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 18 Aug 2013 10:29 PM |
| You really shouldn't attempt to give help if you don't know what you're doing, it only further confuses the OP. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 10:33 PM |
| ^Your probably right. But I was the only one even giving an effort to help for like 30 minutes |
|
|
| Report Abuse |
|
|