generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

What's wrong with this?

Previous Thread :: Next Thread 
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:13 PM
@Toki, yes
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
19 Apr 2015 03:14 PM
Like I said, it should be WaitForChild, not WaitFor
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:14 PM
WaitForChild called on an Instance that is not in a DataModel.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
19 Apr 2015 03:15 PM
You seem to be having odd issues. I'd just go with this:

repeat wait() until char:FindFirstChild("Body Colors")
local bodyColor = char["Body Colors"]
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
19 Apr 2015 03:16 PM
(that's instead of the WaitForChild line)
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:18 PM
fixed the entire thing for you ;)

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
if chr:FindFirstChild("Body Colors", true) then
chr["Body Colors"]:Destroy()
end
local bodyColor = Instance.new("BodyColors", chr)
plr.CanLoadCharacterAppearance = false

bodyColor.HeadColor = BrickColor.new("125")
bodyColor.TorsoColor = BrickColor.new("125")
bodyColor.LeftArmColor = BrickColor.new("125")
bodyColor.RightArmColor = BrickColor.new("125")
bodyColor.LeftLegColor = BrickColor.new("125")
bodyColor.RightLegColor = BrickColor.new("125")

for i,v in pairs(chr:GetChildren()) do
if v:IsA("Hat") then
v:Destroy()
if v:IsA("Shirt") then
v:Destroy()
if v:IsA("Pants") then
v:Destroy()
end
end
end
end

local shirtTexture = "rbxassetid://237745250"
local pantsTexture = "rbxassetid://237745353"
local hats_id = {
"1073690"
}

local sh = Instance.new("Shirt", chr)
local pa = Instance.new("Pants", chr)
sh.ShirtTemplate = ""..shirtTexture
pa.PantsTemplate = ""..pantsTexture

for i,v in pairs(hats_id) do
game:GetService("InsertService"):LoadAsset(v):GetChildren()[1].Parent = chr
end
end)
end)


bark
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:19 PM
I tried this:

bodyParts = {'Head', 'Left Arm', 'Left Leg', 'Right Arm', 'Right Leg', 'Torso'}
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
for _,part in pairs(bodyParts) do
char[part].BrickColor = BrickColor.new(125)
end
end)
end)

But this doesn't work... did I do a bad mistake? Any other methods?
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:19 PM
use my script
it works, tell me if it works for you too c;


bark
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:20 PM

@Toki yay thanks.


Thanks for all your support whoever posted.
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:21 PM
no errors
http://prntscr-com/6vsbz5


bark
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:21 PM
yw
glad to be able to help

bark
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:22 PM
Anyway, do you guys know how to add a decal and make it a face of a player?
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:25 PM
meep
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
19 Apr 2015 03:26 PM
You should probably start a new thread for that.
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:26 PM
added the lines for that

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
if chr:FindFirstChild("Body Colors", true) then
chr["Body Colors"]:Destroy()
end
local bodyColor = Instance.new("BodyColors", chr)
plr.CanLoadCharacterAppearance = false

bodyColor.HeadColor = BrickColor.new("125")
bodyColor.TorsoColor = BrickColor.new("125")
bodyColor.LeftArmColor = BrickColor.new("125")
bodyColor.RightArmColor = BrickColor.new("125")
bodyColor.LeftLegColor = BrickColor.new("125")
bodyColor.RightLegColor = BrickColor.new("125")

for i,v in pairs(chr:GetChildren()) do
if v:IsA("Hat") then
v:Destroy()
if v:IsA("Shirt") then
v:Destroy()
if v:IsA("Pants") then
v:Destroy()
end
end
end
end

local shirtTexture = "rbxassetid://237745250"
local pantsTexture = "rbxassetid://237745353"
local hats_id = {
"1073690"
}

local sh = Instance.new("Shirt", chr)
local pa = Instance.new("Pants", chr)
sh.ShirtTemplate = ""..shirtTexture
pa.PantsTemplate = ""..pantsTexture

for i,v in pairs(hats_id) do
game:GetService("InsertService"):LoadAsset(v):GetChildren()[1].Parent = chr
end

for i,v in pairs(chr.Head:GetChildren()) do
if v:IsA("Decal") then
v:Destroy()
end
end

local face = Instance.new("Decal", chr.Head)
face.Texture = "rbxassetid://87847374" --image id goes here
end)
end)

just replace the script with what i just sent

bark
Report Abuse
VilliusIV is not online. VilliusIV
Joined: 24 Jun 2014
Total Posts: 107
19 Apr 2015 03:28 PM
Thanks Toki. Lol I love the face
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
19 Apr 2015 03:29 PM
np


bark
Report Abuse
Previous Thread :: Next Thread 
Page 2 of 2Go to page: 1, [2] Prev
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image