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: Script

Previous Thread :: Next Thread 
SgtJdog22 is not online. SgtJdog22
Joined: 17 Aug 2008
Total Posts: 4475
23 Aug 2011 10:08 PM
Hey can you guys help me with a script I'm working on? I need a script that you put in a Brick that opens a GUI. For this script lets say the Brick is called Sgt
Report Abuse
SgtJdog22 is not online. SgtJdog22
Joined: 17 Aug 2008
Total Posts: 4475
23 Aug 2011 10:18 PM
Errr anyone?
Report Abuse
micol2242 is not online. micol2242
Joined: 13 Nov 2010
Total Posts: 4732
23 Aug 2011 10:24 PM
No requests.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
23 Aug 2011 10:35 PM
If you post the script we will help you.
Report Abuse
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
23 Aug 2011 11:22 PM
unless you dont know how to script
Report Abuse
SgtJdog22 is not online. SgtJdog22
Joined: 17 Aug 2008
Total Posts: 4475
25 Aug 2011 10:02 PM
I assure you, I do know how to script, here is what I have so far, It does open when you touch it but for some reason when you touch it again it doesn't work. BTW: The Brick these scripts are located in is called Head.

-GiveGui Script(Located under Head)

Brick = script.Parent

function GiveGui(hit)
local player = game.Players:getPlayerFromCharacter(hit.Parent)
local hasGui = player.PlayerGui:findFirstChild("HelpGui")
if (player ~= nil) and (hasGui == nil) then
Give = Brick.HelpGui:Clone()
Give.Parent = player.PlayerGui
end
end

Brick.Touched:connect(GiveGui)

-Close Button(Located under Head.HelpGui.TextButton.Script) -HelpGui is a ScreenGui:

Brick = script.Parent

function GiveGui(hit)
local player = game.Players:getPlayerFromCharacter(hit.Parent)
local hasGui = player.PlayerGui:findFirstChild("HelpGui")
if (player ~= nil) and (hasGui == nil) then
Give = Brick.HelpGui:Clone()
Give.Parent = player.PlayerGui
end
end

Brick.Touched:connect(GiveGui)
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
25 Aug 2011 10:03 PM
You can't have 2 functions that are named the same thing -.-
Report Abuse
SgtJdog22 is not online. SgtJdog22
Joined: 17 Aug 2008
Total Posts: 4475
25 Aug 2011 10:04 PM
So what should I put?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
25 Aug 2011 10:19 PM
It's fine they are in two different scripts.
Report Abuse
SgtJdog22 is not online. SgtJdog22
Joined: 17 Aug 2008
Total Posts: 4475
26 Aug 2011 10:17 PM
Then why doesn't it open when you touch it again AFTER you close it the first time?
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