QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 08:28 PM |
So basically, I have a GUI that pops up when you press "M". It was working great, until I changed the Frame to a ScrollingFrame. Now nothing happens when I press M.
Actually, it works fine when I test it in studio, but it doesn't work at all when I actually play it. When I had it with just the regular Frame, that would work fine when I actually played the game.
What is causing this? |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 08:32 PM |
| My guess is that it has something to do with the scrolling not being defined to the local player. However, I don't know how to do that. |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
| |
|
|
| 01 Sep 2015 09:34 PM |
| Can you provide us with the code that you used? If there isn't any obvious mistakes in the code, then we can assume it's a roblox bug. |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 09:38 PM |
Oh, sure thing
player = game.Players.LocalPlayer mouse = player:GetMouse() map = script.Parent --The is the actual GUI mapFrame = map.mapFrame --This is the ScrollingFrame mapOpen = false --A variable I made that tests if map is open or not mapFrame.Visible = false
mouse.KeyDown:connect(function(keypressed) if keypressed == "m" then if mapOpen == false then mapFrame.Visible = true mapOpen = true elseif mapOpen == true then mapFrame.Visible = false mapOpen = false end end end)
|
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 09:50 PM |
| Yeah... I honestly can't figure it out. It has something to do with that script... but there is no reason why it shouldn't be working. |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 10:57 PM |
| Try printing something once M is pressed to see if the script is actually working. The Visible property of the scrollingframe may be set to true, but isn't getting rendered for some reason. ScrollingFrames are funky. |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 10:59 PM |
| Alright, thanks. Hah, now I feel dumb for making another thread about this. |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 11:01 PM |
| Wait, so did you see the print in the output after pressing M? Is the script responding to the key press? |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 11:10 PM |
Yeah, I made it so it prints Visible when it's visible, and Invisible when it's invisible.
Seemed to work fine in studio. Is there a way to view output in actual Play mode? |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 01 Sep 2015 11:11 PM |
| If it doesn't work in play mode, try making it a local script. |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 11:12 PM |
| It is a local script. That's the odd thing. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 01 Sep 2015 11:14 PM |
| Oh.. I'm sorry may be a bug, did it end up working? |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 11:16 PM |
| No. I can't get it to work. I mean, the scrolling frame scrolls and all.. It's just that when I press the key to make it appear/disappear, it doesn't work. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 01 Sep 2015 11:19 PM |
| Can I get the full script please? |
|
|
| Report Abuse |
|
|
QJD1996
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 1472 |
|
|
| 01 Sep 2015 11:32 PM |
| I posted it earlier in this thread. That is the full script. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 01 Sep 2015 11:33 PM |
| Print something when you press M so you can see if it actually works? |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 01 Sep 2015 11:47 PM |
To view output in normal mode, click Menu>Help>View log
u sicko! |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2015 12:15 AM |
mapFrame = map.mapFrame
You may have to make this: mapFrame = map:WaitForChild'mapFrame'
When you're defining an object as a variable, use WaitForChild to make sure the script doesn't break :P |
|
|
| Report Abuse |
|
|