iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 15 Apr 2017 12:52 PM |
script.Parent.Touched:connect(function(hit) game.Players.LocalPlayer.PlayerGui.Client:destroy()
end)
says attempt to index localplayer as a nil value..
|
|
|
| Report Abuse |
|
|
|
| 15 Apr 2017 12:54 PM |
| You need to be using a local script in order to use Local Player |
|
|
| Report Abuse |
|
|
12904
|
  |
| Joined: 29 Oct 2012 |
| Total Posts: 441 |
|
|
| 15 Apr 2017 12:54 PM |
script.Parent.Touched:connect(function(hit) game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.Client:Destoy() end) |
|
|
| Report Abuse |
|
|
12904
|
  |
| Joined: 29 Oct 2012 |
| Total Posts: 441 |
|
|
| 15 Apr 2017 12:54 PM |
^ in a sever script inside a part.
|
|
|
| Report Abuse |
|
|
hasang1
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 903 |
|
|
| 15 Apr 2017 12:55 PM |
If you are using a localscript and it still doesnt work, wait until the localplayer isnt nil. That shouldnt happen tho. |
|
|
| Report Abuse |
|
|
Boned_Dev
|
  |
| Joined: 11 Dec 2015 |
| Total Posts: 860 |
|
|
| 15 Apr 2017 12:55 PM |
| 12904 did you get the robux I sent!? |
|
|
| Report Abuse |
|
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
| |
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 15 Apr 2017 01:03 PM |
@129
Now it says destroy isnt a valid member of local script.
|
|
|
| Report Abuse |
|
|
Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 15 Apr 2017 01:05 PM |
| Wait for the local player to spawn. |
|
|
| Report Abuse |
|
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 15 Apr 2017 01:07 PM |
I did spawn and I touched the brick
|
|
|
| Report Abuse |
|
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 15 Apr 2017 01:14 PM |
anyone?
script.Parent.Touched:connect(function(hit) game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.Client:destoy() end)
says destroy isnt a valid member of model
|
|
|
| Report Abuse |
|
|
Createa
|
  |
| Joined: 13 Oct 2009 |
| Total Posts: 193 |
|
|
| 15 Apr 2017 01:15 PM |
| Such errors are easily fixed if you look at the wiki for Model, where you would discover it is Destroy and not destroy. |
|
|
| Report Abuse |
|
|
Rice_Nice
|
  |
| Joined: 12 Mar 2017 |
| Total Posts: 166 |
|
| |
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
| |
|