troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
|
| 08 Aug 2016 07:52 PM |
This was working yesterday, but now it isn't. When a character first joins, they still have their hats on. When they reset, the script works fine. Can someone help me out? v
game.Workspace.ChildAdded:connect(function(plr) local name = plr.Name local playerinplayers = game.Players:FindFirstChild(plr.Name) if playerinplayers ~= nil then playerinplayers.CanLoadCharacterAppearance = false plr.Head.face.Texture = "rbxassetid://110490566" local shirt = Instance.new('Shirt', plr) shirt.ShirtTemplate = "rbxassetid://416432753" local pants = Instance.new('Pants', plr) pants.PantsTemplate = "rbxassetid://416432805" local bodycolors = Instance.new("BodyColors", plr) bodycolors.RightArmColor = BrickColor.new("Really black") bodycolors.LeftArmColor = BrickColor.new("Really black") bodycolors.LeftLegColor = BrickColor.new("Really black") bodycolors.RightLegColor = BrickColor.new("Really black") bodycolors.TorsoColor = BrickColor.new("Really black") bodycolors.HeadColor = BrickColor.new("Really black") end end) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 07:54 PM |
game.Workspace.ChildAdded:connect(function(plr) local name = plr.Name local playerinplayers = game.Players:FindFirstChild(plr.Name) if playerinplayers ~= nil then repeat wait(0.45) until plr.Humanoid~= nil playerinplayers.CanLoadCharacterAppearance = false plr.Head.face.Texture = "rbxassetid://110490566" local shirt = Instance.new('Shirt', plr) shirt.ShirtTemplate = "rbxassetid://416432753" local pants = Instance.new('Pants', plr) pants.PantsTemplate = "rbxassetid://416432805" local bodycolors = Instance.new("BodyColors", plr) bodycolors.RightArmColor = BrickColor.new("Really black") bodycolors.LeftArmColor = BrickColor.new("Really black") bodycolors.LeftLegColor = BrickColor.new("Really black") bodycolors.RightLegColor = BrickColor.new("Really black") bodycolors.TorsoColor = BrickColor.new("Really black") bodycolors.HeadColor = BrickColor.new("Really black") end end)
|
|
|
| Report Abuse |
|
|
troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
| |
|
troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
|
| 08 Aug 2016 08:02 PM |
I also have this script running. Is that messing with it? It wasn't before.
local hat = 69434624 game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) asset = game:GetService("InsertService"):LoadAsset(hat) give = game:GetService("InsertService"):Insert(asset) local children = asset:GetChildren() for i = 1, #children do children[i].Parent = character end end) end) |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 08:18 PM |
| Rather than using ChildAdded in workspace, you should use CharacterAdded within the PlayerAdded block. |
|
|
| Report Abuse |
|
|
troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
|
| 08 Aug 2016 08:30 PM |
| Can you elaborate on that a bit more? I don't really know how to script. I've been looking at youtube tutorials. |
|
|
| Report Abuse |
|
|
troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
|
| 08 Aug 2016 08:30 PM |
| OH you mean in the hat script. Got it. |
|
|
| Report Abuse |
|
|
troyqaz
|
  |
| Joined: 22 Jan 2009 |
| Total Posts: 1713 |
|
|
| 08 Aug 2016 08:31 PM |
| Nevermind. I'm real confused. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 09:59 AM |
game.Players.PlayerAdded:connect(function(plr) -- do stuff related to the player, but NOT the character plr.CharacterAdded:connect(function(char) -- do stuff related to the player's CHARACTER -- in your case, that involves giving the hat
This would go in a script somewhere on the server. I prefer the ServerScriptService. |
|
|
| Report Abuse |
|
|
Stewie141
|
  |
| Joined: 21 Aug 2015 |
| Total Posts: 11 |
|
|
| 09 Aug 2016 10:00 AM |
Lol, I just found a new functiony thing: CharacterAdded. Thanks to the guy above me for saying that does stuff to your character, just what I needed for a new auto uniform script!
~Stewie140 |
|
|
| Report Abuse |
|
|