omgitspenguins
Active Member
Veteran
OmgStillAPenguin
Posts: 53
ROBLOX Username: penguins113311
|
Post by omgitspenguins on Apr 29, 2017 0:20:34 GMT
local display = workspace.DisplayChar
local shirt
local pants
local face
local headmesh
local shirtgrap
local inshirt
local inpants
local inface
local inheadmesh
local inshirtgrap
for _,v in pairs(char:GetChildren()) do
if v:IsA('ShirtGraphic') then
shirtgrap = v.Graphic
return shirtgrap
end
if v:IsA('Shirt') then
shirt = v.ShirtTemplate
return shirt
elseif v:IsA("Pants") then
pants = v.PantsTemplate
return pants
end
if v.Name == 'Head' then
if v:IsA('SurfaceGui') then
face = v.Texture
return face
end
if v:IsA('SpecialMesh') then
headmesh = v.MeshType
return headmesh
end
end
end
wait(2)
inshirtgrap = Instance.new('ShirtGraphic')
inshirtgrap.Parent = display
inpants = Instance.new('Pants')
inpants.Parent = display
inface = Instance.new('SurfaceGui')
inface.Parent = display.Head
inheadmesh = Instance.new('SpecialMesh')
inheadmesh.Parent = display.Head
inshirtgrap.Graphic = shirtgrap
inshirt.ShirtTemplate = shirt
inpants.PantsTemplate = pants
inface.Texture = face
inheadmesh.MeshType = headmesh
I honestly don't know if it's not making the Instance or if it's not Parenting them....
|
|
|
Post by Bit on Apr 29, 2017 0:36:57 GMT
Mind to define exactly what the problem is, and with which instance?
|
|
omgitspenguins
Active Member
Veteran
OmgStillAPenguin
Posts: 53
ROBLOX Username: penguins113311
|
Post by omgitspenguins on Apr 29, 2017 0:57:44 GMT
None or even being created and the values aren't returning .-.
|
|
omgitspenguins
Active Member
Veteran
OmgStillAPenguin
Posts: 53
ROBLOX Username: penguins113311
|
Post by omgitspenguins on Apr 29, 2017 0:59:11 GMT
None or even being created and the values aren't returning .-. They're being created, just the values aren't returning for the clothing.
|
|
|
Post by Bit on May 1, 2017 14:57:11 GMT
Why do you use return if not inside a function?
|
|
omgitspenguins
Active Member
Veteran
OmgStillAPenguin
Posts: 53
ROBLOX Username: penguins113311
|
Post by omgitspenguins on May 2, 2017 7:48:35 GMT
Xzeni helped me it was just because I just had to do if shirt then end I'm doing it a other way now anyways
|
|
|
Post by goulstem on May 2, 2017 9:58:48 GMT
Just gonna throw this out there - you can define nils on the same line easily like so
local display = workspace.DisplayChar local shirt,pants,face,headmesh,shirtgrap,inshirt,inpants,inface,inheadmesh,inshirtgrap
|
|