|
| 16 Feb 2014 10:08 PM |
I'm not getting any errors, and the 3 prints in the functions aren't even printing off. This tells me there is something wrong with my tables, though I do not know what.
Character = script.Parent.Parent Setup = script.Parent
FemStyles = { "http://roblox.com/asset/?id=145729606", "http://roblox.com/asset/?id=82186393", "http://roblox.com/asset/?id=13070796", "http://roblox.com/asset/?id=29713297", "http://roblox.com/asset/?id=27410010", "http://roblox.com/asset/?id=65941165", "http://roblox.com/asset/?id=47645941", "http://roblox.com/asset/?id=41445619", "http://roblox.com/asset/?id=36870078", "http://roblox.com/asset/?id=139148391" }
FemStyleSize = { Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.8, 0.8, 0.8), Vector3.new(0.9, 1, 1), Vector3.new(0.8, 0.9, 0.8), Vector3.new(0.7, 0.7, 0.65), Vector3.new(1.6, 1.6, 1.6) }
FemStylePos = { Vector3.new(0, 0.15, 0.15), Vector3.new(0, 0.2, 0), Vector3.new(0, -0.3, -0.05), Vector3.new(0, -0.5, -0.05), Vector3.new(0, -0.7, 0.15), Vector3.new(0, 0.2, 0.025), Vector3.new(0, -0.14, 0.05), Vector3.new(0, -0.14, 0), Vector3.new(0.01, 0.6, 0.1), Vector3.new(0, -0.06, 0.05) }
FemStyleAng = { Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0) }
function UpdateCharacterAppearance() print(1)
if Setup.IsWearingHat.Value == false then print(2)
if Setup.Gender == "Female" then print(3)
if Setup["Hair Style"].Value == 0 then local Hair = Character:GetChildren() for i = 1, #Hair do if Hair[i].Name == "Hair" then Hair[i]:Destroy() end end elseif Setup["Hair Style"].Value > 0 then local Hair = Character:GetChildren() for i = 1, #Hair do if Hair[i].Name == "Hair" then Hair[i]:Destroy() end end local H1 = Instance.new("Part") H1.Name = "Hair"; H1.FormFactor = "Symmetric"; H1.Shape = "Block" H1.TopSurface = "Smooth"; H1.BottomSurface = "Smooth"; H1.Size = Vector3.new(1, 1, 1) H1.BrickColor = Setup["Hair Color"].Value; H1.Parent = Character local mH1 = Instance.new("SpecialMesh") mH1.Parent = H1; mH1.MeshId = FemStyles[Setup["Hair Style"].Value] mH1.Scale = Vector3.new(FemStyleSize[Setup["Hair Style"].Value]) local wH1 = Instance.new("Weld") wH1.Name = Character.Head.Name.."To"..H1.Name; wH1.Parent = Character.Head wH1.Part0 = Character.Head; wH1.Part1 = H1 wH1.C0 = CFrame.new(FemStylePos[Setup["Hair Style"].Value]) * CFrame.Angles(FemStyleAng[Setup["Hair Style"].Value]) end
end
end
end
Setup["Gender"].Changed:connect(UpdateCharacterAppearance) Setup["Shirt Color"].Changed:connect(UpdateCharacterAppearance) Setup["Shorts Color"].Changed:connect(UpdateCharacterAppearance) Setup["Shoe Color"].Changed:connect(UpdateCharacterAppearance) Setup["Hair Color"].Changed:connect(UpdateCharacterAppearance) Setup["Skin Color"].Changed:connect(UpdateCharacterAppearance) Setup["Hair Style"].Changed:connect(UpdateCharacterAppearance) Setup["Class"].Changed:connect(UpdateCharacterAppearance) Setup["IsWearingHat"].Changed:connect(UpdateCharacterAppearance) Setup["Secondary"].Changed:connect(UpdateCharacterAppearance) |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 10:25 PM |
| Your tables look fine. Are you sure the events are firing? Try adding another print, this time before function update and another one before the first listener. If these two print off then your events are not firing. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 10:50 PM |
not sure im followin where ur goin with this.
put a print before the function? and then one after it? |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 10:52 PM |
--one here
function UpdateCharacterAppearance() --- end
-- and here
Setup["Gender"].Changed:connect(UpdateCharacterAppearance)
|
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 10:59 PM |
not to sound cynical but that doesnt mean anything. they will print because they are outside the function and things like that will run as soon as the script is enabled.
Anyway it may have been a connection issue the first time but it prints up to 2
it should be printing 3 as well since Gender.Value == "Female" but it isnt. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 11:01 PM |
i placed prints 4 - 6 as well in this area
local wH1 = Instance.new("Weld") wH1.Name = Character.Head.Name.."To"..H1.Name; wH1.Parent = Character.Head wH1.Part0 = Character.Head; wH1.Part1 = H1 wH1.C0 = CFrame.new(FemStylePos[Setup["Hair Style"].Value]) * CFrame.Angles(FemStyleAng[Setup["Hair Style"].Value]) end print(4) end print(5) end print(6)
end
Setup["Gender"].Changed:connect(UpdateCharacterAppearance) Setup["Shirt Color"].Changed:connect(UpdateCharacterAppearance) Setup["Shorts Color"].Changed:connect(UpdateCharacterAppearance)
the out prints 1 and 2, skips 3 and 4, then prints 5 and 6
|
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:20 PM |
Setup.Gender.Value
Try that. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 11:24 PM |
ok I figured out why it skipped 3 and 4
If Setup.Gender == "Female"
it should be: if Setup.Gender.Value == "Female"
So I fixed that and got this error.
23:05:15.105 - Workspace.Char.Setup.Script:86: bad argument #3 to 'Angles' (number expected, got no value) 23:05:15.115 - Script 'Workspace.Char.Setup.Script', Line 86 23:05:15.116 - stack end 23:05:15.117 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Feb 2014 11:31 PM |
| i think it may have something to do with my Vector3 tables |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 16 Feb 2014 11:35 PM |
Yea, I was thinking that, too. Error says it got nothing, though...
Is the value given doesn't exist? I dunno. |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:37 PM |
CFrame.Angles doesn't accept vector3.new. Try giving it 0,0,0 from your table. Except you might have to write it as a string and use tostring so CFrame.Angles could use it
|
|
|
| Report Abuse |
|
|
| |
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:39 PM |
Something like this:
angles { blah = '0,0,0'
}
CFrame.Angles(tostring(angles[1])) |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 16 Feb 2014 11:40 PM |
It would've said it didn't accept Vector3 values and not nothing, though...
Isn't it:o?
Ik the Vector3 is wrong. It's supposed to be 3 radian arguments. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 16 Feb 2014 11:41 PM |
angles { blah = 'return math.rad(10),math.rad(-2),math.rad(63)'
}
CFrame.Angles(loadstring(angles.blah)())
I feel special.
|
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:42 PM |
| It makes sense in my head! Man, I', terrible at explaining things.... Dx |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:44 PM |
Just tested it. When I ran this:
workspace.BasePlate.CFrame = CFrame.new(Vector3.new(0,0,0)) * CFrame.Angles(Vector3(0,0,0))
It gave me the same error.But when I ran this:
workspace.BasePlate.CFrame = CFrame.new(Vector3.new(0,0,0)) * CFrame.Angles(0,0,0)
It was fine. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 16 Feb 2014 11:45 PM |
| Weird that it calls Vector3 as nothing. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 11:47 PM |
| it isnt just the angles. the Scale of the mesh is also coming up as 0,0,0 as if it is ignoring the vectr3 values in the FemStyleSize table |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:48 PM |
It is odd.
I should probably go to bed. I postponed going to sleep far too long. Ugh. |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:50 PM |
| You could try what I suggested from before? Unless you've already considered it. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 11:50 PM |
I guess I can ignore the angles for the female hair because none of them are angled. so i s'pose i can just leave it as 0,0,0 in the function
also theres only 1 male hair that is angled but i guess i can switch it out for a hair mesh that doesnt need to be.
also i was able to fix the mesh scaling.
i was calling for a vector3 inside of a vector3. I just took out the Vector3.new in the function and left the one in the table. that fixed that. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 16 Feb 2014 11:51 PM |
| You can learn from my post about the load string for the angles =P. |
|
|
| Report Abuse |
|
|
Virtual3D
|
  |
| Joined: 15 Jan 2009 |
| Total Posts: 634 |
|
|
| 16 Feb 2014 11:52 PM |
| Whatever you are making sounds interesting :o |
|
|
| Report Abuse |
|
|