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 » Scripting Helpers
Home Search
 

Re: check if player has item

Previous Thread :: Next Thread 
BlockDeleted is not online. BlockDeleted
Joined: 31 May 2014
Total Posts: 291
11 Nov 2014 03:19 PM
im trying to create a script where it checks if players have a gui..and if they have it then it gets removed
Report Abuse
BlockDeleted is not online. BlockDeleted
Joined: 31 May 2014
Total Posts: 291
11 Nov 2014 03:40 PM
hump
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
11 Nov 2014 03:41 PM
Does it gui have a name? Or something else?
Report Abuse
inapt is not online. inapt
Joined: 04 Oct 2008
Total Posts: 11666
11 Nov 2014 03:59 PM
http://wiki.roblox.com/index.php?title=API:Class/Instance/FindFirstChild


-ForeverDev
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
11 Nov 2014 04:01 PM
Just check if it exists and remove it?

if Player.PlayerGui:FindFirstChild("Gui") then
Player.PlayerGui:FindFirstChild("Gui"):Destroy()
end
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Nov 2014 04:05 PM
"if Player.PlayerGui:FindFirstChild("Gui") then
Player.PlayerGui:FindFirstChild("Gui"):Destroy()"

Uh, I'm pretty sure this way uses less resources and is more efficient.
if Player.PlayerGui:FindFirstChild("Gui") then
Player.PlayerGui.Gui:Destroy()
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
11 Nov 2014 04:07 PM
@Jarod
If you consider a few bytes less resources then sure.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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