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
|
  |
| Joined: 17 Aug 2008 |
| Total Posts: 4475 |
|
| |
|
micol2242
|
  |
| Joined: 13 Nov 2010 |
| Total Posts: 4732 |
|
| |
|
|
| 23 Aug 2011 10:35 PM |
| If you post the script we will help you. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2011 11:22 PM |
| unless you dont know how to script |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 25 Aug 2011 10:03 PM |
| You can't have 2 functions that are named the same thing -.- |
|
|
| Report Abuse |
|
|
SgtJdog22
|
  |
| Joined: 17 Aug 2008 |
| Total Posts: 4475 |
|
| |
|
|
| 25 Aug 2011 10:19 PM |
| It's fine they are in two different scripts. |
|
|
| Report Abuse |
|
|
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 |
|
|