drgn42
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
|
| 02 Oct 2011 12:13 PM |
ok. so, i got a script
script.Parent.Touched:connect(function(h) game.Players:GetPlayerFromCharacter(h.Parent).PlayerGui.Monster.Value = 1 end)
and it doesnt change the value. it says in the output
line 2, attempt to index a nil value.
how do i fix this? |
|
|
| Report Abuse |
|
|
Aeroh
|
  |
| Joined: 24 Sep 2011 |
| Total Posts: 50 |
|
| |
|
drgn42
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
| |
|
drgn42
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
| |
|
drgn42
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
| |
|
Aeroh
|
  |
| Joined: 24 Sep 2011 |
| Total Posts: 50 |
|
|
| 02 Oct 2011 12:41 PM |
| what in the world is h for? |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 02 Oct 2011 12:52 PM |
I recommend to use a IntValue.
script.Parent.Touched:connect(function(h) if h.Parent:findFirstChild("Humanoid") == nil then return end game.Players:GetPlayerFromCharacter(h.Parent).PlayerGui.Monster.Value = 1 end) |
|
|
| Report Abuse |
|
|
drgn1
|
  |
| Joined: 17 Mar 2010 |
| Total Posts: 4 |
|
| |
|