|
| 18 Feb 2013 10:51 AM |
Yep. So, I made a script, however it does not appear to be working, and my output is not telling me what the issue is. Could I have some help, please?
function Heads( Person ) repeat wait( ) until Person.Character local Head = Person.Character.Head local Copy = Head:clone( ) Copy.Name = Person.Name.."'s Head" Copy.face:remove( ) Head.Transparency = 1 local Weld = Instance.new( "Weld" ) Weld.Part0 = Head Weld.Part1 = Copy Weld.Parent = Head.Parent Copy.Parent = Head.Parent repeat wait( ) until Head.Parent:findFirstChild( "Body Colors" ) Copy.BrickColor = Head.Parent:findFirstChild( "Body Colors" ).HeadColor end
function onRespawn(PLAYER,CHAR) wait(2) if DeHead == true then Heads(PLAYER) end
if CHAR ~= nil then if CHAR:findFirstChild("Pants") ~= nil then CHAR.Pants:remove() end if CHAR:findFirstChild("Shirt") ~= nil then CHAR.Shirt:remove() end if PLAYER.TeamColor == BrickColor.new("Bright red") then--more team color >.> P = script.RedPants:clone() P.Name = "Pants" P.Parent = CHAR S = script.RedShirt:clone() S.Name = "Shirt" S.Parent = CHAR else P = script.BluePants:clone() P.Name = "Pants" P.Parent = CHAR S = script.BlueShirt:clone() S.Name = "Shirt" S.Parent = CHAR end end end
|
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2013 11:09 AM |
| Put some print("stuff") throughout the script to help you identify the problem. |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2013 12:36 PM |
print("nonfail") function Heads( Person ) repeat wait( ) until Person.Character local Head = Person.Character.Head local Copy = Head:clone( ) Copy.Name = Person.Name.."'s Head" Copy.face:remove( ) Head.Transparency = 1 local Weld = Instance.new( "Weld" ) Weld.Part0 = Head Weld.Part1 = Copy Weld.Parent = Head.Parent Copy.Parent = Head.Parent repeat wait( ) until Head.Parent:findFirstChild( "Body Colors" ) Copy.BrickColor = Head.Parent:findFirstChild( "Body Colors" ).HeadColor end
print("stuff1")
function onRespawn(PLAYER,CHAR) wait(2) if DeHead == true then Heads(PLAYER) end
if CHAR ~= nil then if CHAR:findFirstChild("Pants") ~= nil then CHAR.Pants:remove() end print("stuff2") if CHAR:findFirstChild("Shirt") ~= nil then CHAR.Shirt:remove() end print("stuff3") if PLAYER.TeamColor == BrickColor.new("Bright red") then--more team color >.> P = script.RedPants:clone() P.Name = "Pants" P.Parent = CHAR S = script.RedShirt:clone() S.Name = "Shirt" S.Parent = CHAR else P = script.BluePants:clone() P.Name = "Pants" P.Parent = CHAR S = script.BlueShirt:clone() S.Name = "Shirt" S.Parent = CHAR end end end print("end")
It goes from nonfail, to stuff1, straight to end, and it does not point out what is wrong with the other prints in the script. |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2013 03:38 PM |
| You onRespawn function never goes. |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2013 04:11 PM |
By using playeradded and characteradded events :3
function playeradded(p) p.CharacterAdded:connect(function() onRespawn(p) end) end game:GetService("Players").PlayerAdded:connect(playeradded)
something along those lines, it prolly wont work what i have above though :O, just an example |
|
|
| Report Abuse |
|
|