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
 

destroy() on frame help

Previous Thread :: Next Thread 
lukaguy98 is not online. lukaguy98
Joined: 24 Jul 2011
Total Posts: 670
19 Mar 2014 12:53 PM
gui.MouseButton1Click:connect(function()
game.StarterGui.Simulator.Frame:Destroy()
end)

Basically if you press a textbutton, the frame is removed from the screen. Should I try remove() or what am i doing wrong?
Report Abuse
pio22raqr7 is not online. pio22raqr7
Joined: 11 Jul 2012
Total Posts: 420
19 Mar 2014 12:54 PM
do remove(), since you would not get the GUI back.
Report Abuse
lukaguy98 is not online. lukaguy98
Joined: 24 Jul 2011
Total Posts: 670
19 Mar 2014 12:55 PM
Still not working.
Report Abuse
lukaguy98 is not online. lukaguy98
Joined: 24 Jul 2011
Total Posts: 670
19 Mar 2014 12:58 PM
Bump
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
19 Mar 2014 12:58 PM
If there is a player in the game, then you need to remove it from the player; those stuff in the StarterGui are just copied to the player.

So something like:
game.Players.Player.PlayerGui.Simulator.Frame:Destroy()
would work
Report Abuse
lukaguy98 is not online. lukaguy98
Joined: 24 Jul 2011
Total Posts: 670
19 Mar 2014 01:00 PM
Would that need a localscript?
Report Abuse
lukaguy98 is not online. lukaguy98
Joined: 24 Jul 2011
Total Posts: 670
19 Mar 2014 01:01 PM
e.e
Report Abuse
LemmJuice is not online. LemmJuice
Joined: 23 Feb 2014
Total Posts: 866
19 Mar 2014 01:01 PM
Yes, A Gui will most likely need a local script.
Just place it in the same place as the frame and then use the .parent to go to other guis.
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
19 Mar 2014 01:02 PM
If it was a localscript you could easily acces the local player object by doing game.Players.LocalPlayer
If you have it in a normal script then you will have to replace the ".Player." part with the player you want it removed by.
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