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 » Scripting Helpers
Home Search
 

Re: I thought this would work

Previous Thread :: Next Thread 
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 03:43 PM
But it didn't:
local faces = {"rbxasset://textures/face.png", "http://www.roblox.com/asset/?id=110651351", "http://www.roblox.com/asset/?id=11594912", "http://www.roblox.com/asset/?id=12657253", "http://www.roblox.com/asset/?id=150545226", "http://www.roblox.com/asset/?id=32042920"}
local hairs = {"", "http://www.roblox.com/asset/?id=47963332", "http://www.roblox.com/asset/?id=26400959", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=72424418","http://www.roblox.com/asset/?id=19999424", "http://roblox.com/asset/?id=82186933",""}
local hairscales={Vector3.new(0,0,0),Vector3.new(1,1,0.81), Vector3.new(1,1,1.03), Vector3.new(1,1,1.03), Vector3.new(1.05,1.05,1.05), Vector3.new(1.1,1,1), Vector3.new(1.07,1.07,1.07), Vector3.new(1.05,1.05,1.05), Vector3.new(0,0,0)}
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.7,0), CFrame.new(0,-.4,0), CFrame.new(0.05,-.3,-0.2), CFrame.new(0,-.4,0), CFrame.new(0,-.4,-0.3), CFrame.new(0.071,-.3,-0.1), CFrame.new(0.05,-.2,0),CFrame.new(0,0,0)}
local skins = {"Light orange", "Pastel brown", "Reddish brown", "Brown","Cool yellow"}
local haircolors = {"Really black", "Dark stone grey", "Reddish brown","Brown", "Dark orange", "Bright yellow", "New Yeller", "White", "" }





local h = Instance.new("Part", c)
h.Name="Hair"
h.CanCollide=false
h.BrickColor = BrickColor.new(haircolors[p.CharacterStats.HairColor.Value])
local w = Instance.new("Weld",h)
w.Part0 = c.Head
w.Part1 = h
w.C1 = hairC0[p.CharacterStats.Hair.Value]
local m = Instance.new("SpecialMesh",h)
m.MeshId= hairs[p.CharacterStats.Hair.Value]
m.Scale = hairscales[p.CharacterStats.Hair.Value]
for i,v in pairs(c.Head:GetChildren()) do
if v.Name=="face" then
v.Texture = faces[p.CharacterStats.Face.Value]
end
end
for i,v in pairs(c:GetChildren()) do
if v.Name=="Part" and v.Name~="Hair" then
v.BrickColor = BrickColor.new(skins[p.CharacterStats.Skin.Value])
end
end

As you can see, I have several tables at the top, there is values in the player. And they are IntValues, they index which part of the table to use. I'm a bad explainer, but please help.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 03:47 PM
What isn't working?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 03:55 PM
It creates the part and weld and mesh, but diesn't change the C1, or the MeshId or the BrickColor of Hair or the Scale.
Report Abuse
fret13103 is not online. fret13103
Joined: 15 Mar 2010
Total Posts: 881
23 Jul 2014 03:57 PM
Because those can't be changed by default.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 03:58 PM
I didn't get that.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 03:59 PM
w.C1 = hair
C0[p.CharacterStats.Hair.Value]

Something with this

p.CharacterStats.Hair
^ What is that
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:08 PM
It's a value in the player.
Report Abuse
FlamedSkull is not online. FlamedSkull
Joined: 23 May 2009
Total Posts: 1379
23 Jul 2014 04:09 PM
Whats the error output?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:11 PM
There is no error
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 04:13 PM
Ask these guys

http://www.roblox.com/Forum/ShowForum.aspx?ForumID=33
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:22 PM
They don't like help requests.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:38 PM
bump
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 04:38 PM
yes they do

yesterday they helped someone with their 500 line script
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:39 PM
Though, I don't trust you anymore.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 04:41 PM
wtf did i do to u
i told u where the problem is and ur saying u dont trust me
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:42 PM
Spawn(wait) remember?
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 04:45 PM
i didnt do that to u

w.C1 = hair--dont no what hair is
w.C0 = p.CharacterStats.Hair.Value
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 04:58 PM
bump
Report Abuse
InfamousGorillas is not online. InfamousGorillas
Joined: 22 Apr 2014
Total Posts: 52
23 Jul 2014 05:01 PM
local faces = {"rbxasset://textures/face.png", "http://www.roblox.com/asset/?id=110651350", "http://www.roblox.com/asset/?id=11594912", "http://www.roblox.com/asset/?id=12657253", "http://www.roblox.com/asset/?id=150545226", "http://www.roblox.com/asset/?id=32042920"}
local hairs = {"", "http://www.roblox.com/asset/?id=47963332", "http://www.roblox.com/asset/?id=26400959", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=72424418","http://www.roblox.com/asset/?id=19999424", "http://roblox.com/asset/?id=82186933",""}
local hairscales={Vector3.new(0,0,4.53),Vector3.new(1,1,0.81), Vector3.new(1,1,1.03), Vector3.new(1,1,1.03), Vector3.new(1.05,1.05,1.05), Vector3.new(1.1,1,1), Vector3.new(1.07,1.07,1.07), Vector3.new(1.05,1.05,1.05), Vector3.new(0,0,0)};Spawn(wait)
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.7,0), CFrame.new(70,-.4,0), CFrame.new(0.05,-.3,-0.2), CFrame.new(0,-.4,0), CFrame.new(0,-.4,-0.3), CFrame.new(0.071,-.3,-0.1), CFrame.new(0.05,-.2,0),CFrame.new(0,0,0)}
local skins = {"Light orange", "PasteI brown", "Reddish brown", "Brown","Cool yellow"}
local haircolors = {"Really black", "Dark stone grey", "Reddish brown","Brown", "Dark orange", "Bright yellow", "New Yeller", "White", "" }




game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
local h = Instance.new("Part", c)
h.Name="Hair"
h.CanCollide=false
h.BrickColor = BrickColor.new(haircolors[p.CharacterStats.HairColor.Value])
local w = Instance.new("Weld",h)
w.Part0 = c.Head
w.Part1 = h
w.C1 = hairC0[p.CharacterStats.Hair.Value]
local m = Instance.new("SpecialMesh",h)
m.MeshId= hairs[p.CharacterStats.Hair.Value]
m.Scale = hairscales[p.CharacterStats.Hair.Value]
for i,v in pairs(c.Head:GetChildren()) do
if v.Name=="face" then
v.Texture = faces[p.CharacterStats.Face.Value]
end
end
for i,v in pairs(c:GetChildren()) do
if v.Name=="Part" and v.Name~="Hair" then
v.BrickColor = BrickColor.new(skins[p.CharacterStats.Skin.Value])
end
end
end)
end)

here u go my friend
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 05:01 PM
^ tested and works

at least someone is nice enuf to helpp u
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 05:12 PM
It didn't work. Here is the full script.
local faces = {"rbxasset://textures/face.png", "http://www.roblox.com/asset/?id=110651351", "http://www.roblox.com/asset/?id=11594912", "http://www.roblox.com/asset/?id=12657253", "http://www.roblox.com/asset/?id=150545226", "http://www.roblox.com/asset/?id=32042920"}
local hairs = {"", "http://www.roblox.com/asset/?id=47963332", "http://www.roblox.com/asset/?id=26400959", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=72424418","http://www.roblox.com/asset/?id=19999424", "http://roblox.com/asset/?id=82186933",""}
local hairscales={Vector3.new(0,0,0),Vector3.new(1,1,0.81), Vector3.new(1,1,1.03), Vector3.new(1,1,1.03), Vector3.new(1.05,1.05,1.05), Vector3.new(1.1,1,1), Vector3.new(1.07,1.07,1.07), Vector3.new(1.05,1.05,1.05), Vector3.new(0,0,0)}
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.7,0), CFrame.new(0,-.4,0), CFrame.new(0.05,-.3,-0.2), CFrame.new(0,-.4,0), CFrame.new(0,-.4,-0.3), CFrame.new(0.071,-.3,-0.1), CFrame.new(0.05,-.2,0),CFrame.new(0,0,0)}
local skins = {"Light orange", "Pastel brown", "Reddish brown", "Brown","Cool yellow"}
local haircolors = {"Really black", "Dark stone grey", "Reddish brown","Brown", "Dark orange", "Bright yellow", "New Yeller", "White", "" }
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
local shirt = Instance.new("Shirt")
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=24181873"
shirt.Name = "Shirt"
shirt.Parent = c
local pants = Instance.new("Pants")
pants.PantsTemplate = "http://www.roblox.com/asset/?id=41022159"
pants.Name = "Pants"
pants.Parent = c
repeat wait() until p:FindFirstChild("CharacterStats")~=nil
if p.CharacterStats.Created.Value==false then
print("Player not created!")
script.Parent.CreateCharacter:Clone().Parent = p:WaitForChild("PlayerGui")
p.PlayerGui.CreateCharacter.Disabled = false
for i,v in pairs(game.Workspace.Spawns:GetChildren()) do
if v.Name=="" or v.Name==c.Name then
c:MoveTo(v.Position)
v.Name=c.Name
break
end
end
elseif p.CharacterStats.Created.Value==true then
local h = Instance.new("Part", c)
h.Name="Hair"
h.CanCollide=false
h.BrickColor = BrickColor.new(haircolors[p.CharacterStats.HairColor.Value])
local w = Instance.new("Weld",h)
w.Part0 = c.Head
w.Part1 = h
w.C1 = hairC0[p.CharacterStats.Hair.Value]
local m = Instance.new("SpecialMesh",h)
m.MeshId= hairs[p.CharacterStats.Hair.Value]
m.Scale = hairscales[p.CharacterStats.Hair.Value]
for i,v in pairs(c.Head:GetChildren()) do
if v.Name=="face" then
v.Texture = faces[p.CharacterStats.Face.Value]
end
end
for i,v in pairs(c:GetChildren()) do
if v.Name=="Part" and v.Name~="Hair" then
v.BrickColor = BrickColor.new(skins[p.CharacterStats.Skin.Value])
end
end


end

end)
end)
Report Abuse
InfamousGorillas is not online. InfamousGorillas
Joined: 22 Apr 2014
Total Posts: 52
23 Jul 2014 05:16 PM
local faces = {"rbxasset://textures/face.png", "http://www.roblox.com/asset/?id=110651351", "http://www.roblox.com/asset/?id=11594912", "http://www.roblox.com/asset/?id=12657253", "http://www.roblox.com/asset/?id=150545226", "http://www.roblox.com/asset/?id=32042920"}
local hairs = {"", "http://www.roblox.com/asset/?id=47963332", "http://www.roblox.com/asset/?id=26400959", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=72424418","http://www.roblox.com/asset/?id=19999424", "http://roblox.com/asset/?id=82186933",""}
local hairscales={Vector3.new(0,0,0),Vector3.new(1,1,0.81), Vector3.new(1,1,1.03), Vector3.new(1,1,1.03), Vector3.new(1.05,1.05,1.05), Vector3.new(1.1,1,1), Vector3.new(1.07,1.07,1.07), Vector3.new(1.05,1.05,1.05), Vector3.new(0,0,0)}
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.7,0), CFrame.new(0,-.4,0), CFrame.new(0.05,-.3,-0.2), CFrame.new(0,-.4,0), CFrame.new(0,-.4,-0.3), CFrame.new(0.071,-.3,-0.1), CFrame.new(0.05,-.2,0),CFrame.new(0,0,0)}
local skins = {"Light orange", "Pastel brown", "Reddish brown", "Brown","Cool yellow"}
local haircolors = {"Really black", "Dark stone grey", "Reddish brown","Brown", "Dark orange", "Bright yellow", "New Yeller", "White", "" }
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
local shirt = Instance.new("Shirt")
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=24181873"
shirt.Name = "Shirt"
shirt.Parent = c
local pants = Instance.new("Pants")
pants.PantsTemplate = "http://www.roblox.com/asset/?id=41022159"
pants.Name = "Pants"
pants.Parent = c
repeat wait() until p:FindFirstChild("CharacterStats")~=nil
if p.CharacterStats.Created.Value==false then
print("Player not created!")
script.Parent.CreateCharacter:Clone().Parent = p:WaitForChild("PlayerGui")
p.PlayerGui.CreateCharacter.Disabled = false
for i,v in pairs(game.Workspace.Spawns:GetChildren()) do
if v.Name=="" or v.Name==c.Name then
c:MoveTo(v.Position)
v.Name=c.Name
break
end
end
elseif p.CharacterStats.Created.Value==true then
local h = Instance.new("Part", c)
h.Name="Hair"
h.CanCollide=false
h.BrickColor = BrickColor.new(haircolors[p.CharacterStats.HairColor.Value])
local w = Instance.new("Weld",h)
w.Part0 = c.Head
w.Part1 = h
w.C1 = hairC0[p.CharacterStats.Hair.Value]
local m = Instance.new("SpecialMesh",h)
m.MeshId= hairs[p.CharacterStats.Hair.Value]
m.Scale = hairscales[p.CharacterStats.Hair.Value]
for i,v in pairs(c.Head:GetChildren()) do
if v.Name=="face" then
v.Texture = faces[p.CharacterStats.Face.Value]
end
end
for i,v in pairs(c:GetChildren()) do
if v.Name=="Part" and v.Name~="Hair" then
v.BrickColor = BrickColor.new(skins[p.CharacterStats.Skin.Value])
end
end


end

end)
end)

can be changed to this to make it work

local faces = {"rbxasset://textures/face.png", "http://www.roblox.com/asset/?id=110651351", "http://www.roblox.com/asset/?id=11594912", "http://www.roblox.com/asset/?id=12657253", "http://www.roblox.com/asset/?id=150545226", "http://www.roblox.com/asset/?id=32042920"}
local hairs = {"", "http://www.roblox.com/asset/?id=47963332", "http://www.roblox.com/asset/?id=26400959", "http://www.roblox.com/asset/?id=62246019", "http://www.roblox.com/asset/?id=16627529", "http://www.roblox.com/asset/?id=72424418","http://www.roblox.com/asset/?id=19999424", "http://roblox.com/asset/?id=82186933",""}
local hairscales={Vector3.new(0,0,0),Vector3.new(1,1,0.81), Vector3.new(1,1,1.03), Vector3.new(1,1,1.03), Vector3.new(1.05,1.05,1.05), Vector3.new(1.1,1,1), Vector3.new(1.07,1.07,1.07), Vector3.new(1.05,1.05,1.05), Vector3.new(0,0,0)}
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.7,0), CFrame.new(0,-.4,0), CFrame.new(0.05,-.3,-0.2), CFrame.new(0,-.4,0), CFrame.new(0,-.4,-0.3), CFrame.new(0.071,-.3,-0.1), CFrame.new(0.05,-.2,0),CFrame.new(0,0,0)}
local skins = {"Light orange", "Pastel brown", "Reddish brown", "Brown","Cool yellow"}
local haircolors = {"Really black", "Dark stone grey", "Reddish brown","Brown", "Dark orange", "Bright yellow", "New Yeller", "White", "" }
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
local shirt = Instance.new("Shirt")
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=24181873"
shirt.Name = "Shirt"
shirt.Parent = c
local pants = Instance.new("Pants")
pants.PantsTemplate = "http://www.roblox.com/asset/?id=41022159"
pants.Name = "Pants"
pants.Parent = c
repeat wait() until p:FindFirstChild("CharacterStats")~=nil
if p.CharacterStats.Created.Value==false then
print("Player not created!")
script.Parent.CreateCharacter:Clone().Parent = p:WaitForChild("PlayerGui")
p.PlayerGui.CreateCharacter.Disabled = false
for i,v in pairs(game.Workspace.Spawns:GetChildren()) do
if v.Name=="" or v.Name==c.Name then
c:MoveTo(v.Position)
v.Name=c.Name
break
end
end
elseif p.CharacterStats.Created.Value==true then
local h = Instance.new("Part", c)
h.Name="Hair"
h.CanCollide=false
h.BrickColor = BrickColor.new(haircolors[p.CharacterStats.HairColor.Value])
local w = Instance.new("Weld",h)
w.Part0 = c.Head
w.Part1 = h
w.C1 = hairC0[p.CharacterStats.Hair.Value]
local m = Instance.new("SpecialMesh",h)
m.MeshId= hairs[p.CharacterStats.Hair.Value]
m.Scale = hairscales[p.CharacterStats.Hair.Value]
for i,v in pairs(c.Head:GetChildren()) do
if v.Name=="face" then
v.Texture = faces[p.CharacterStats.Face.Value]
end
end
for i,v in pairs(c:GetChildren()) do
if v.Name=="Part" and v.Name~="Hair" then
v.BrickColor = BrickColor.new(skins[p,CharacterStats.Skin.Value])
end
end


end

end)
end)

Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 05:27 PM
It didn't work...
Report Abuse
InfamousGorillas is not online. InfamousGorillas
Joined: 22 Apr 2014
Total Posts: 52
23 Jul 2014 05:28 PM
then u have a virus on ur computer and shoud delete system32 immediately to prevnet the virus from spreading to another computer

Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
23 Jul 2014 05:29 PM
Like I'd do that,
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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