wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:24 AM |
button.MouseButton1Down:connect(function() if game.Players:GetPlayerFromCharacter(char).PlayerGui.MainList.Frame2.Visible == false then game.Players:GetPlayerFromCharacter(char).PlayerGui.Mainlist.Frame2.Visible = true end end
Alot of things are wrong, can you tell me what I need to change? And its a GUI button Local Script |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
|
| 06 Aug 2011 12:30 AM |
You haven't defined char, try this:
button.MouseButton1Down:connect(function() if game.Players.LocalPlayer.PlayerGui.MainList.Frame2.Visible == false then game.Players.LocalPlayer.PlayerGui.Mainlist.Frame2.Visible = true end end
|
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 06 Aug 2011 12:31 AM |
| He neither defined 'button'. |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
|
| 06 Aug 2011 12:32 AM |
Oh true, I didn't even notice...
I'm going to go ahead and stop posting here, I make too many obvious mistakes Dx |
|
|
| Report Abuse |
|
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:37 AM |
| Cant I just put "local button" at the start of the script to define it? |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 06 Aug 2011 12:39 AM |
script.Parent.MouseButton1Down:connect(function() -- I guess this script is inside the button. local Frame2 = game.Players.LocalPlayer.PlayerGui.MainList.Frame Frame2.Visible = not Frame2.Visible end |
|
|
| Report Abuse |
|
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
| |
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:49 AM |
| Nope, Doesnt work. Btw, this is in Frame, not Frame2 |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 06 Aug 2011 12:50 AM |
| Are you using a LocalScript or a normal script? |
|
|
| Report Abuse |
|
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:51 AM |
| Normal, should I change to Local? |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:53 AM |
| Changed, Still doesnt work |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
| |
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 12:59 AM |
There are 2 frames
Its in the first one
Is that a problem? |
|
|
| Report Abuse |
|
|
wsd906
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 9880 |
|
|
| 06 Aug 2011 01:05 AM |
Here is a script I have in my place that might interferes, it activates Screen GUI (Frame 1 and 2 are in it)
function onTouched(hit) local human = hit.Parent:FindFirstChild("Humanoid") if (human == nil) then return end local char = hit.Parent if game.Players:GetPlayerFromCharacter(char).PlayerGui.ScreenGui.Frame.Visible == false then game.Players:GetPlayerFromCharacter(char).PlayerGui.ScreenGui.Frame.Visible = true end end script.Parent.Touched:connect(onTouched)
When I test it, the first frame loads, but when I click the button, the second one doesnt. |
|
|
| Report Abuse |
|
|