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

Why doesn't this script work?

Asked by 9 years ago
wait(2)
if script.Parent.Parent.TeamColor == BrickColor.new("Black") then
if workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Shirt") == nil then
if workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Pants") ~= nil then
workspace:FindFirstChild(script.Parent.Parent.Name).Pants:remove()
a = Instance.new("Shirt")
a.ShirtTemplate = ("http://www.roblox.com/asset/?id=142329378")
a.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
b = Instance.new("Pants")
b.PantsTemplate = ("http://www.roblox.com/asset/?id=162148016")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
else
a = Instance.new("Shirt")
a.ShirtTemplate = ("http://www.roblox.com/asset/?id=142329378")
a.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
b = Instance.new("Pants")
b.PantsTemplate = ("http://www.roblox.com/asset/?id=162148015")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
end
else 
if workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Pants") ~= nil then
workspace:FindFirstChild(script.Parent.Parent.Name).Shirt:remove()
workspace:FindFirstChild(script.Parent.Parent.Name).Pants:remove()
a = Instance.new("Shirt")
a.ShirtTemplate = ("http://www.roblox.com/asset/?id=142329378")
a.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
b = Instance.new("Pants")
b.PantsTemplate = ("http://www.roblox.com/asset/?id=162148016")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
else
workspace:FindFirstChild(script.Parent.Parent.Name).Shirt:remove()
a = Instance.new("Shirt")
a.ShirtTemplate = ("http://www.roblox.com/asset/?id=142329378")
a.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
b = Instance.new("Pants")
b.PantsTemplate = ("http://www.roblox.com/asset/?id=162148016")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
end
end
end

It's putted in startergui, and It should work. WHy doesn't it?

0
Output please? bobafett3544 198 — 9y
0
16:25:15.899 - Use the new http api: no 16:25:19.370 - FileSystem temp directory: C:\Users\ROMANH~1\AppData\Local\Temp\Roblox Loading Cutscene Editor... 16:25:32.378 - DataModel Loading http://www.roblox.com/asset/?id=54118952 Cutscene Editor Loaded Ro-Defender has removed a total of 6829 viruses and junk items from your games! 16:25:40.835 - blocking http://www.robalox.com/asset/?id=16606141 16:2 coolguy1v1 0 — 9y

Answer this question