|
| 25 Aug 2013 12:40 AM |
shield.Touched:connect(function(part) if not part then return end if not part.Parent then return end plrname = part.Parent.Name convict = game.Players:FindFirstChild(plrname) if convict:FindFirstChild("Humanoid") then ctme = convict:FindFirstChild("ctime") if ctme ~= nil then if convict.TeamColor == BrickColor.new("White") or convict.TeamColor == BrickColor.new("Bright yellow") then ctme.Value = jailtime end end end end)
------------------------------------------------------
Line 4, attempt to access global convict, nil value.
Assume that ctime exists within the player. |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2013 12:41 AM |
Also assume that jailtime exists.
This is just a portion of a piece of code. |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
| |
|
|
| 25 Aug 2013 12:43 AM |
| Alright, now, a solution would be nice. |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2013 12:45 AM |
| Are you allowed to have many ands in an if statement if so then that would fix all ur problems. |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 25 Aug 2013 12:45 AM |
ch = part.Parent convict = game.Players:GetPlayerFromCharacter(ch) |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2013 12:45 AM |
| Can you have many and's in an if statement if so then that would fix all your errors. |
|
|
| Report Abuse |
|
|