generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: whats wrong with this?

Previous Thread :: Next Thread 
iReIix is not online. 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
Disaster_Scripts is not online. Disaster_Scripts
Joined: 10 May 2016
Total Posts: 2310
15 Apr 2017 12:54 PM
You need to be using a local script in order to use Local Player
Report Abuse
12904 is online. 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 is online. 12904
Joined: 29 Oct 2012
Total Posts: 441
15 Apr 2017 12:54 PM
^ in a sever script inside a part.
Report Abuse
hasang1 is not online. 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 is not online. 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 is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
15 Apr 2017 12:59 PM
ty guys ;)


Report Abuse
iReIix is not online. 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 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
15 Apr 2017 01:05 PM
Wait for the local player to spawn.
Report Abuse
iReIix is not online. 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 is not online. 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 is not online. 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 is not online. Rice_Nice
Joined: 12 Mar 2017
Total Posts: 166
15 Apr 2017 01:17 PM
":destoy()"
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
15 Apr 2017 01:24 PM
nvm yea i found that out


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image