Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:12 PM |
I am trying to make this button "minimise" the gui when clicked.
Button = game.Workspace.AdminGui.Main.Minimise a = game.Workspace.AdminGui.Main function minimise() a.BackgroundTransparency = 1 a.Bar.BackgroundTransparency = 1 a.Bar.TextTransparency = 1 a.Minimize.BackgroundTransparency = .5 a.Minimize.TextTransparency = .5 a.TextLabel.BackgroundTransparency = 1 a.TextLabel.TextTransparency = 1 end
Button.MouseButton1Click:connect(minimise) |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2017 02:24 PM |
You cannot place a GUI in the Workspace to make it visible.
|
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:26 PM |
| Huh? This gui is being cloned from ### ######### #### ### starter gui of specific people (I already scripted that part). |
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:28 PM |
Ugh I dislike the filter, but at least it blocks out bad words too.
I basically said that it is being cloned and placed into specific people's starter gui's |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2017 02:30 PM |
Okay, in that case, I wouldn't access the GUI from the DataModel (game) but from the script itself. You could also set the Visible property of the GUI to false instead of making the background and text invisible.
|
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:31 PM |
I think I figured out why it isn't working, but it still won't work.
When it is cloned, the clone won't be in the workspace. I fixed it, but it still won't work.
Button = game.Workspace.AdminGui.Main.Minimize a = game.Workspace.AdminGui.Main function minimize() a.BackgroundTransparency = 1 a.Bar.BackgroundTransparency = 1 a.Bar.TextTransparency = 1 a.Minimize.BackgroundTransparency = .5 a.Minimize.TextTransparency = .5 a.TextLabel.BackgroundTransparency = 1 a.TextLabel.TextTransparency = 1 end
Button.MouseButton1Click:connect(minimize) |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2017 02:32 PM |
To detect a click on a part you have to use a ClickDetector. As for guis, it's a property called MouseButton1Click (only for gui Button objects) |
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:32 PM |
| I posted ### last version. Oops Button = ############################## a = script.Parent.Parent.Parent function minimise() a.BackgroundTransparency = 1 a.Bar.BackgroundTransparency = 1 a.Bar.TextTransparency = 1 a.Minimize.BackgroundTransparency = .5 a.Minimize.TextTransparency = .5 ################################## = 1 ############################ = 1 end Button.MouseButton1Click:connect(minimise) |
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:33 PM |
Button = script.Parent.Parent.TextLabel a = script.Parent.Parent.Parent function minimise() a.BackgroundTransparency = 1 a.Bar.BackgroundTransparency = 1 a.Bar.TextTransparency = 1 a.Minimize.BackgroundTransparency = .5 a.Minimize.TextTransparency = .5 a.TextLabel.BackgroundTransparency = 1 a.TextLabel.TextTransparency = 1 end
Button.MouseButton1Click:connect(minimise) |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2017 02:34 PM |
| And as for FE, local scripts can't change properties of objects located on ### server. |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2017 02:34 PM |
| Try this: Button = script.Parent -- Change to ### ######## ## ### GUI in PlayerGui a = Button.Parent.Main Button.MouseButton1Down:connect(function() a.BackgroundTransparency = 1 a.Bar.BackgroundTransparency = 1 a.Bar.TextTransparency = 1 a.Minimize.BackgroundTransparency = .5 a.Minimize.TextTransparency = .5 ################################## = 1 ############################ = 1 end) |
|
|
| Report Abuse |
|
|
Mindmixer
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 1878 |
|
|
| 19 Feb 2017 02:35 PM |
| I put a click detector in but it still won't work. I put it in ### button. |
|
|
| Report Abuse |
|
|