generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: I have a problem with a ScrollingFrame

Previous Thread :: Next Thread 
QJD1996 is not online. 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 is not online. 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 is not online. QJD1996
Joined: 20 Jan 2009
Total Posts: 1472
01 Sep 2015 08:49 PM
Nevermind...
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
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 is not online. 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 is not online. 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
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
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 is not online. 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
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. jashwa
Joined: 08 Feb 2010
Total Posts: 378
01 Sep 2015 11:19 PM
Can I get the full script please?
Report Abuse
QJD1996 is not online. 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 is not online. 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 is not online. 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
lilblitz56 is not online. lilblitz56
Joined: 06 Nov 2010
Total Posts: 461
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image