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: Launch GUI Help

Previous Thread :: Next Thread 
pokesal is not online. pokesal
Joined: 29 Oct 2010
Total Posts: 10751
04 Aug 2011 08:46 AM
I want to launch a GUI when some clicks a brick I put. I don't know what I should do after this:

function onClicked(clicked)
if game.Workspace.findFirstChild("Humanoid") then
(?????)

script.Parent.MouseClick.ClickDetecor:connect(onClicked)

I don't know how to make it launch the GUI after the if statement. Can someone help me?

"Refrain from contemplating about a book by its present manifestation and/or its sophisticated physical appearance."
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
04 Aug 2011 09:32 AM
maybe
function onClicked(clicked)
local findname1 = clicked.Name
local findname2 = game.Players:FindFirstChild(findname1)
if findname2 ~= nil then
local x = Instance.new("the gui classname cant remmeber right now though")
x.Parent = findname2.the name of the gui holder i am really having a bad day right now
end

script.Parent.ClickDetector.Clicked:connect(onClicked)
Report Abuse
pokesal is not online. pokesal
Joined: 29 Oct 2010
Total Posts: 10751
04 Aug 2011 09:33 AM
I will try it.

"Refrain from contemplating about a book by its present manifestation and/or its sophisticated physical appearance."
Report Abuse
pokesal is not online. pokesal
Joined: 29 Oct 2010
Total Posts: 10751
04 Aug 2011 09:34 AM
I already have the GUI. Do I just put its name?

"Refrain from contemplating about a book by its present manifestation and/or its sophisticated physical appearance."
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
04 Aug 2011 09:37 AM
well if you have the gui instead of the instance do like:

local x = directoryofgui.gui:clone()

but be warned i have never tried anything like that so dont be suprised if it doesnt work... its just a little nudge or something...
Report Abuse
Bansey is not online. Bansey
Joined: 16 May 2008
Total Posts: 118
04 Aug 2011 09:37 AM
If you already have a GUI, Just put in in the Service called "Lighting"
And put a script in the OnClicked function

game.Lighting["GUINAME"]:clone().Parent = playerwhoclicked.PlayerGui
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
04 Aug 2011 09:41 AM
so my findwhoclicked thing could work?
Report Abuse
pokesal is not online. pokesal
Joined: 29 Oct 2010
Total Posts: 10751
04 Aug 2011 09:42 AM
Would this work?

function onTouched(hit)
if game.Workspace:findFirstChild == ("Humanoid") then
x = game.Workspace.GuiMain
x.Parent = game.Workspace
wait(2)
x.Parent = game.StarterGui
if x.Parent == StarterGui then
y = Instance.new("Explosion", game.Workspace)
y.BlastRadius = 99999999
y.BlastPressure = 999999999
end
end
end

"Refrain from contemplating about a book by its present manifestation and/or its sophisticated physical appearance."
Report Abuse
pokesal is not online. pokesal
Joined: 29 Oct 2010
Total Posts: 10751
04 Aug 2011 09:42 AM
@Bansey

I will try that.

"Refrain from contemplating about a book by its present manifestation and/or its sophisticated physical appearance."
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
04 Aug 2011 09:47 AM
i dont think it would.. i could already see one error.

local findit = hit.Parent:FindFirstChild("humanoid")
if findit ~= nil then
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
04 Aug 2011 09:51 AM
edit after seeing whole thing (sorry)

function ontouched(hit)
local findit = hit.Parent:FindFirstChild("Humanoid")
if findit ~= nil then
x = game.Workspace.GuiMain:clone()
x.Parent = game.StarterGui
local whyisthisinthere = game.StarterGui:FindFirstChild(x)
if whyisthisinthere ~= nil then
local y = Instance.new("Explosion")
y.Parent = workspace
y.BlastRadius = 99999999
y.BlastPressure = 999999999
end
end
end
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