Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
|
| 01 Dec 2012 12:34 PM |
function onPlayerRespawned(newPlayer) wait(5)
local Character = newPlayer.Character
if Character.Torso ~= nil then Character.Torso.Transparency = 1 end if Character.Head ~= nil then Character.Head.Transparency = 1 end if Character.Head.face.Texture ~= nil then Character.Head.face.Texture = "" end if Character:findFirstChild("Right Leg") ~= nil then Character:findFirstChild("Right Leg").Transparency = 1 end if Character:findFirstChild("Left Leg") ~= nil then Character:findFirstChild("Left Leg").Transparency = 1 end if Character:findFirstChild("Right Arm") ~= nil then Character:findFirstChild("Right Arm").Transparency = 1 end if Character:findFirstChild("Left Arm") ~= nil then Character:findFirstChild("Left Arm").Transparency = 1 end
local x = Character:GetChildren() for i=1, #x do if x[i].className == "Hat" then x[i]:Remove() end end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function(property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end end
game.Players.ChildAdded:connect(onPlayerEntered)
That is the script... The problem is it keeps outputting the following "Attempt to call a nill value" |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 01 Dec 2012 12:39 PM |
Please do not make a new thread because your other one didn't get another reply, yet. Also, stop bumping so often. Your thread didn't really hit the second page, yet.
The last one you tried, the one made by thedestroyer115. Use that script. However, you need to change one of his lines..
Change x[i]:Remove() to y[x]:Destroy() |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 01 Dec 2012 12:40 PM |
Let me clarify..
Change
local y = Character.Head:GetChildren() for x=1, #y do if y[x].className == "Sound" then x[i]:Remove() end end end
to
local y = Character.Head:GetChildren() for x=1, #y do if y[x].className == "Sound" then y[x]:Destroy() end end end |
|
|
| Report Abuse |
|
|
Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
| |
|