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: Works, but don't works

Previous Thread :: Next Thread 
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 04:11 AM
I have a script, it works. Changes everything. But, it doesn't change it by view..
~Tynexx
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
12 Jul 2014 04:19 AM
Yeah good story.

Post a script or get out.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 04:22 AM
Don't need to be harsh -.-

This is the WHOLE 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)}
local hairC0 = {CFrame.new(0,0,0), CFrame.new(0,-.07,0), CFrame.new(0,-.04,0), CFrame.new(0.05,-.03,-0.2), CFrame.new(0,-.04,0), CFrame.new(0,-.04,-0.3), CFrame.new(0.071,-.03,-0.1), CFrame.new(0.05,-.02,0)}
current_hairs_index = 1
current_hairscales_index = 1
current_hairC0_index = 1


current_face_index = 1
local leftpanel = script.Parent.LeftPanel
local player = script.Parent.Parent.Parent
print(player.Name)
repeat wait() until player.Character
local char = player.Character
print(char)


--face
leftpanel.Face.Left.MouseButton1Down:connect(function()
print("Clicked!")
player.PlayerGui:FindFirstChild("CreateCharacter").Subject.Value = "Head"
if current_face_index<1 and current_face_index >6 then
current_face_index = current_face_index +1
end

end)

leftpanel.Face.Right.MouseButton1Down:connect(function()
print("Clicked!")
print("Clicked!")
player.PlayerGui:FindFirstChild("CreateCharacter").Subject.Value = "Head"
if current_face_index<1 and current_face_index >6 then
current_face_index = current_face_index -1
end
end)

--hairstyle
current_hairs_index = 1
current_hairscales_index = 1
current_hairC0_index = 1

leftpanel.HairStyle.Left.MouseButton1Down:connect(function()
print("Clicked!")
if current_hairs_index>=1 and current_hairs_index<=7 then
print("Pass 1")
if current_hairscales_index>=1 and current_hairscales_index<=7 then
print("Pass 2")
if current_hairC0_index>=1 and current_hairC0_index<=7 then
print("Pass 3")
current_hairs_index = current_hairs_index +1
current_hairscales_index = current_hairscales_index +1
current_hairC0_index = current_hairC0_index +1
end
end
end
end)
while wait() do
print(current_hairs_index, current_hairC0_index, current_hairscales_index)
char:FindFirstChild("Head"):FindFirstChild("face").Texture = faces[current_face_index]
for i,v in pairs(char:GetChildren()) do
if v.Name=="Hair" then
v:remove()
end
end
local hair = Instance.new("Part", char)
hair.Name = "Hair"
local weld = Instance.new("Weld")
weld.Part0 = char:FindFirstChild("Head")
weld.Part1 = hair
weld.C0 = CFrame.Angles(0,0,0) *hairC0[current_hairC0_index]
print(weld.C0)
weld.Parent = hair
local mesh = Instance.new("SpecialMesh")
mesh.MeshId = hairs[current_hairs_index]
print(mesh.MeshId)
mesh.Scale = hairscales[current_hairscales_index]
print(mesh.Scale)
mesh.Parent = hair
end

~Tynexx
Report Abuse
MrTucan1996 is not online. MrTucan1996
Joined: 19 Aug 2009
Total Posts: 5994
12 Jul 2014 04:29 AM
-_-'

What's the specific line that has the error?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 04:30 AM
It's in here:
while wait() do
print(current_hairs_index, current_hairC0_index, current_hairscales_index)
char:FindFirstChild("Head"):FindFirstChild("face").Texture = faces[current_face_index]
for i,v in pairs(char:GetChildren()) do
if v.Name=="Hair" then
v:remove()
end
end
local hair = Instance.new("Part", char)
hair.Name = "Hair"
local weld = Instance.new("Weld")
weld.Part0 = char:FindFirstChild("Head")
weld.Part1 = hair
weld.C0 = CFrame.Angles(0,0,0) *hairC0[current_hairC0_index]
print(weld.C0)
weld.Parent = hair
local mesh = Instance.new("SpecialMesh")
mesh.MeshId = hairs[current_hairs_index]
print(mesh.MeshId)
mesh.Scale = hairscales[current_hairscales_index]
print(mesh.Scale)
mesh.Parent = hair
end

~Tynexx
Report Abuse
MrTucan1996 is not online. MrTucan1996
Joined: 19 Aug 2009
Total Posts: 5994
12 Jul 2014 04:32 AM
It looks right.

But anything can look right in our eyes. What does output say. If we get more specific we could help each other.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 04:34 AM
Well, the output say's nothing. But it prints everything..
~Tynexx
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 02:31 PM
Bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 07:48 PM

~Tynexx
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 08:11 PM
bump
~Tynexx
Report Abuse
blox6137 is not online. blox6137
Joined: 23 Nov 2008
Total Posts: 1109
12 Jul 2014 08:43 PM
You're talking in codes Tynexx.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
13 Jul 2014 01:19 AM
I am?
~Tynexx
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
13 Jul 2014 03:25 AM
Bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
13 Jul 2014 05:24 PM
bumo
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
13 Jul 2014 06:26 PM
bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
14 Jul 2014 01:44 AM
HELP
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
14 Jul 2014 05:16 AM
what's the script meant to do and what is the error
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
14 Jul 2014 03:13 PM
It's suppost to change the meshId, Scale and Weld C0. Im not sure about the Scale, but the C0 part doesn't work. They don't change.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
14 Jul 2014 07:09 PM
bu,mp
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