|
| 09 Apr 2015 04:44 PM |
| I need a script that, once you join and every time you respawn, you get a certain outfit. What process would I use for this and how would I work my way about it? |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Apr 2015 05:37 PM |
assetPants = "Pants assetId here" assetShirt = "Shirt assetId here"
repeat wait() until game.Players.LocalPlayer repeat wait() until game.Players.LocalPlayer.Character
char = game.Players.LocalPlayer.Character p = char:findFirstChild("Pants") s = char:findFirstChild("Shirt")
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if p then p.PantsTemplate = assetPants elseif p == nil then local e = Instance.new("Pants") e.Parent = char e.PantsTemplate = assetPants end if s then s.ShirtTemplate = assetShirt elseif s == nil then local e = Instance.new("Shirt") e.Parent = char e.ShirtTemplate = assetShirt end end) end) |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:01 PM |
I tried your script and added on to it;
assetPants = 158036763 assetShirt = 157974597 char = game.Players.LocalPlayer.Character p = char:findFirstChild("Pants") s = char:findFirstChild("Shirt")
repeat wait() until game.Players.LocalPlayer repeat wait() until char
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if p then p.Appearance.PantsTemplate = "http://www.roblox.com/asset/?id=" .. assetPants elseif p == nil then local e = Instance.new("Pants") e.Parent = char e.Appearance.PantsTemplate = "http://www.roblox.com/asset/?id=" .. assetPants end if s then s.Appearance.ShirtTemplate = "http://www.roblox.com/asset/?id=" .. assetShirt elseif s == nil then local e = Instance.new("Shirt") e.Parent = char e.Appearance.ShirtTemplate = "http://www.roblox.com/asset/?id=" .. assetShirt end end) end)
But it did not work. Any help? |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:03 PM |
I am tired of writing the same piece of code over and over for each person that asks about this.
There are models and plugins about this you can read the code on and learn from. Go look. ._.
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:09 PM |
| Thanks for the enlightening, interesting and super responsive answer. This 100% helped me to solve the problem, especially since it used a method I tried doing twice before posting this thread but yet yielded no results. What a fantastic reply! I think you deserve some sort of commendation for this post. |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:14 PM |
I am tired of writing the same piece of code over and over for each person that asks about this.
There are models and plugins about this you can read the code on and learn from. Go look. ._.
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:15 PM |
^Fail double post, sorry :3 It said flood check or whatever. So I clicked it again. :P
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 07:15 PM |
| Now not only once, but twice! Your problem solving methods are just as good as your helping methods! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
rileySK3
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 94 |
|
| |
|