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
 

need help with an onTouched gui function

Previous Thread :: Next Thread 
TheAsianGamerHD is not online. TheAsianGamerHD
Joined: 02 Apr 2008
Total Posts: 321
16 Sep 2014 07:24 PM
I'm trying to make it so after you touch the part, the Gui fades away, then finally deletes itself. This is what I have for the script:

local Gui = game.Lighting.Gui1 --Replace this with the location of your GUI

function GiveGui(Player)
if Player.PlayerGui:FindFirstChild(Gui.Name)~=nil then return end
Gui:Clone().Parent=Player.PlayerGui
end

script.Parent.Touched:connect(function(hit)

local Player=game.Players:GetPlayerFromCharacter(hit.Parent)
if Player==nil then return end
GiveGui(Player)

end)

What should I add to make the Gui fade away then finally delete itself? I know it's something like game.Workspace.Gui1.GuiTransparency = .75 then so on, but it doesn't seem to work out and I can't connect the functions properly. Any helps is much appreciated!

Thank you SH. :)




-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt-
Report Abuse
TheAsianGamerHD is not online. TheAsianGamerHD
Joined: 02 Apr 2008
Total Posts: 321
16 Sep 2014 07:53 PM
bump


-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt-
Report Abuse
Deplexity is not online. Deplexity
Joined: 18 Nov 2011
Total Posts: 1965
16 Sep 2014 07:56 PM
You would probably want to use a for loop for that.

http://wiki.roblox.com/index.php?title=Generic_for
Report Abuse
TheAsianGamerHD is not online. TheAsianGamerHD
Joined: 02 Apr 2008
Total Posts: 321
16 Sep 2014 08:24 PM
I haven't learnt that yet, can someone help me out.
thanks.

0.0



-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt-
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