Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
|
| 01 Dec 2012 11:11 AM |
function onPlayerRespawned(newPlayer) wait(1)
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
local y = Character.Head:GetChildren() for x=1, #y do if y[x].className == "Sound" 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)
It's getting on my nerves...
It keeps outputting... "17:10:24 - attempt to call a nil value 17:10:24 - Disconnected event because of exception" |
|
|
| Report Abuse |
|
|
Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
| |
|
|
| 01 Dec 2012 11:20 AM |
| Post the EXACT output, and maybe I could help. |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 11:21 AM |
function onPlayerRespawned(newPlayer) wait(1)
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
local y = Character.Head:GetChildren() for x=1, #y do if y[x].className == "Sound" then x[i]:Remove() end end end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function(property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 11:24 AM |
function onPlayerRespawned(newPlayer) --define. wait(1)
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
local y = Character.Head:GetChildren() for x=1, #y do if y[x].className == "Sound" then x[i]:Remove() end end end
function onPlayerEntered(newPlayer) --define? newPlayer.Changed:connect(function(property) if (property == "Character") then onPlayerRespawned(newPlayer) --did you define onPlayer? end end) end
game.Players.ChildAdded:connect(onPlayerEntered) ---Did you define?
|
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 11:29 AM |
Ignore Protector17. He totally failed. He defined all of those.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 01 Dec 2012 11:36 AM |
| It usually tells you the line where the error occured, in the output. Was that all it said? |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 11:44 AM |
Have you used my script yet? ._.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
|
| 01 Dec 2012 12:01 PM |
| Sorry for delay, TheDestroyer115. I used your script and received this output message "Workspace.Script:38: attempt to index local 'x' (a number value)" |
|
|
| Report Abuse |
|
|
Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
| |
|
Zarteon
|
  |
| Joined: 25 Apr 2011 |
| Total Posts: 2085 |
|
| |
|
|
| 01 Dec 2012 01:33 PM |
WOW! Sorry! My epic fail:
function onPlayerRespawned(newPlayer) wait(1)
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
for _,x in pairs(newPlayer.Character:GetChildren()) if x:IsA("Hat") then x:Destroy() end end
for _,v in pairs(newPlayer.Character.Head:GetChildren()) if v:IsA("Sound") then v:Destroy() end end end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function(property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
- thedestroyer115 |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 01 Dec 2012 01:39 PM |
Lol, no worries. You just needed to change a line. He started a new thread for some reason, when it wasn't getting replies. However, I told him to use yours with one line changed. Other than that, it was all good.
Link to other thread: http://www.roblox.com/Forum/ShowPost.aspx?PostID=83412886 |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 01:44 PM |
Link to the answer to your problems: Two posts above this one.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2012 01:44 PM |
AKA: MY SCRIPT!
- thedestroyer115 |
|
|
| Report Abuse |
|
|