devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
|
| 29 Mar 2015 06:50 AM |
So I just watched a tutorial and changed the part it was making visible, to my parts.
This is the script, most of it is just shortening the names and changing the Visible property to true and false.
OpenClose = game.Workspace.StarterGui.STATS
gwork = game.Workspace.StarterGui
AgiBox = gwork.Agility AgiText = gwork.Agility.AGItext AgiLevel = gwork.Agility.Agilevel
DexBox = gwork.Dexteritiy DexText = gwork.Dexteritiy.DEXtext DexLevel = gwork.Dexteritiy.DEXlevel
LucBox = gwork.Luck LucText = gwork.Luck.LUCtext LucLevel = gwork.Luck.LUClevel
SenBox = gwork.Sense SenText = gwork.Sense.SENtext SenLevel = gwork.Sense.SENlevel
StrBox = gwork.Strength StrText = gwork.Strength.STRtext StrLevel = gwork.Strength.STRlevel
VitBox = gwork.Vitality VitText = gwork.Vitality.VITtext VitLevel = gwork.Vitality.VITlevel
Open = false
OpenClose.MouseButton1Down:connect(function(open) if Open == false then AgiBox.Visible = true AgiText.Visible = true AgiLevel.Visible = true DexBox.Visible = true DexText.Visible = true DexLevel.Visible = true LucBox.Visible = true LucText.Visible = true LucLevel.Visible = true SenBox.Visible = true SenText.Visible = true SenLevel.Visible = true StrBox.Visible = true StrText.Visible = true StrLevel.Visible = true VitBox.Visible = true VitText.Visible = true VitLevel.Visible = true Open = true elseif Open == true then AgiBox.Visible = false AgiText.Visible = false AgiLevel.Visible = false DexBox.Visible = false DexText.Visible = false DexLevel.Visible = false LucBox.Visible = false LucText.Visible = false LucLevel.Visible = false SenBox.Visible = false SenText.Visible = false SenLevel.Visible = false StrBox.Visible = false StrText.Visible = false StrLevel.Visible = false VitBox.Visible = false VitText.Visible = false VitLevel.Visible = false Open = false end) end)
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2015 06:52 AM |
it's game.StarterGui not game.Workspace.StarterGui
and you have to change the one inside the player. not startergui. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2015 06:53 AM |
change it to a local script
and change this OpenClose = game.Workspace.StarterGui.STATS
gwork = game.Workspace.StarterGui
to this gwork = game.Players.LocalPlayer.PlayerGui OpenClose = gwork.STATS |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
|
| 29 Mar 2015 06:54 AM |
I did this.
OpenClose = game.StarterGui.STATS
gwork = game.StarterGui
I don't get what you mean by the last part- |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
| |
|
|
| 29 Mar 2015 06:55 AM |
Starter Gui is just the thing that gets cloned to the player! if you want to mess with it, you have to mess with the one inside the player!!! |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
|
| 29 Mar 2015 06:56 AM |
I've pretty much just started scripting so.
I don't have to move the gui out of StarterGui do I? |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
| |
|
|
| 29 Mar 2015 06:57 AM |
um no. and P.S, you have to put the localscript inside StarterGui or StarterPack, or at least a child of those things. |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
|
| 29 Mar 2015 06:58 AM |
I put the local script inside the Button.
It still doesn't work.
And the output says
Players.Player.PlayerGui.StatScreen.STATS.LocalScript:1: unexpected symbol near '=' |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
|
| 29 Mar 2015 07:10 AM |
| I tried it in the actual game, and for some reason when you enter the gui I want to open and close is already there, and some text is missing too- |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2015 07:17 AM |
| add 'local' before all of your variables. |
|
|
| Report Abuse |
|
|
devHide
|
  |
| Joined: 27 Mar 2015 |
| Total Posts: 44 |
|
| |
|