Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This is not working? [HELP]

Asked by
Tynezz 0
10 years ago
char = script.Parent.Parent.Character
if char:FindFirstChild("Shirt")==nil then
    s = Instance.new("Shirt")
    s.Name ="Shirt"
    s.Parent = char

    if char:FindFirstChild("Pants")==nil then
    c = Instance.new("Pants")
    c.Name = "Pants"
    c.Parent = char
    print("Passed1")
    end
    end
repeat 
    wait() 
    until char:FindFirstChild("Shirt").ShirtTemplate == ""
repeat
     wait() 
    until char:FindFirstChild("Pants").PantsTemplate == ""
print("Passed 2")
local hair = Instance.new("Part")
hair.Name = "HairCore"
hair.BrickColor = BrickColor.new("Reddish brown")
hair.Parent = char
print("Passed3")
local hairmesh = Instance.new("FileMesh")
hairmesh.Name = "HairMesh"
hairmesh.MeshId = "http://www.roblox.com/asset/?id=16627529"
hairmesh.Scale = Vector3.new(1.05, 1.05, 1.05)
hairmesh.Parent = hair
print("Passed4")
local shirt = char:FindFirstChild("Shirt")
if shirt then
shirt.ShirtTemplate = "rbxassetid://13343842"
shirt.Parent = char
print("Passed5")
local pants = char:FindFirstChild("Pants")
if pants then
pants.PantsTemplate = "rbxassetid://7307783"
pants.Parent = char
print("Passed6")
local weld = Instance.new("Weld")
weld.Part0 = char["Head"]
weld.Part1 = hair
weld.C1 = CFrame.Angles(0,0,0) *CFrame.new(0,-0.5,0)
weld.Parent = hair
print("Passed7")
local face = char.Head:FindFirstChild("face")
if face then
face.Texture = "http://www.roblox.com/asset/?id=100952572"
face.Name = "face"
face.Parent = char:WaitForChild("Head")
print("Passed8")
local gla = Instance.new("Part")
gla.BrickColor = BrickColor.new("Really black")
gla.Name = "GlassesCore"
gla.Parent = char
local gm = Instance.new("FileMesh")
gm.MeshId = "http://www.roblox.com/asset/?id=30166087"
gm.Parent = gla
local w2 = Instance.new("Weld")
w2.Part0 = char["Head"]
w2.Part1 = gla
w2.C1 = CFrame.Angles(0,0,0) *CFrame.new(0,-.6,.3)
w2.Parent = gla
print("Passed9")
end
end
end

Everything works fine! Except, the shirt and pants part. It wouldn't change the ShirtTemplate/PantsTemplate.. But everything works in Test mode, but not online mode..

0
Help please Tynezz 0 — 10y
1
Please put all your code in a code block. MrFlimsy 345 — 10y

Answer this question