SurfaceGui w/ ScrollingFrame Zoom Issues

Haven’t found any topics on the subject, and I can only assume this is the place to go in regards to this issue.

I use SurfaceGuis for leaderboards. There is a ScrollingFrame within for the list of players on the board. When using the mouse wheel to scroll, the character zooms in and out. This is a bit unfortunate as it’s most clear to see them when in first person, as well as I prefer first person.

How can I fix this behavior?

Things I’ve tried:

  1. Making SurfaceGui.Active true (and tried false)
  2. Making ScrollingFrame.Active true (and tried false)
  3. Setting SurfaceGui.Adornee, didn’t change behavior
  4. Changing SurfaceGui.ClipsDescendants
  5. Changing the CanvasSize adjustment code to use Scale rather than Offset

Is this behavior just not possible? I could use a hacky method, like detecting if their mouse is pointing at a leaderboard, and locking their zoom while they are. But this is hacky, and not user friendly at all.

Any tips would be appreciated.

3 Likes

You know how roblox’s leaderboard has a button gui with the player’s name. Well do that with your leaderboard if you didn’t do that already, and tell me if it works.

1 Like

Good idea, however, unfortunately this didn’t change anything. Character still zooms in and out as I scroll up/down the leaderboard.

1 Like

Strange, i have never had this problem before.

1 Like

devForumLeaderboardExample.rbxm (8.9 KB)

Here’s a model of one of my leaderboards for reference, should it help. But, I tried with any ScrollingFrame within a SurfaceGui and the behavior appears the same. A friend told me it’s possible, and that they’ve done it before, but I tried everything they suggested and the character still wants to zoom while scrolling.

You can try adding content in the ScrollingFrame, like buttons or frames etc, but nothing seems to work.

I’m not sure if this just isn’t a feature, or if this feature was broken by Roblox updates or what.

Here’s my Camera properties of StarterPlayer, in case that for some reason matters:
image

1 Like

This all look normal and good to me, i don’t think changing the camera distance should mess it up, but i am uploading a gui i made. (without scripts)

try inserting this gui https://www.roblox.com/library/4752062004/Gui

1 Like

Yes, this works just fine. However, my issue is with SurfaceGuis on parts specifically. All other Guis in the game scroll just fine.

If I copy the Gui you made onto a SurfaceGui, the same effect happens where during scrolling, my character will zoom in/out.

If this behavior isn’t possible, my best bet would just be to set a lesser amount of people who can be shown at once and ditch the ScrollingFrame entirely, but I’d like to avoid doing that if at all possible.

I do recall this once being a thing. Now, it seems to want to zoom me in/out.

OHHHH, im stupid :laughing: but let me see what i can do. (if i can do anything)

1 Like

All good! Everybody makes mistakes.

If you happen to find a way to fix this, I’d be very appreciative. I’ve been going nuts for over an hour trying to figure out what I’m doing wrong.

1 Like

Do you have any games that do a scrolling gui leaderboard that you can give me the link to?

Unfortunately no; I don’t really play any Roblox games, haven’t for a few years now. I just played jailbreak for the first time last week. I can try to find one, though. I know with 90% certainty it’s been done in the past. Not sure if updates to the camera system just broke this or what. I’ll try and dig something up for you.

2 Likes

Okay thanks, and currently i am trying to make a script (if its possible) to where it locks your camera when your mouse hovers over the leaderboard.

1 Like

BRO! I made a script that works!

1 Like

Took me a little while though :laughing: .

1 Like

Send me a DM, or make a free model and I’ll take it and investigate how you pulled it off.

Thanks for all your hard work trying to figure this out by the way! I’ve been baffled for hours. I thought I was just doing something wrong, but I guess you do have to script your own way instead.

1 Like

Here ya go :smile: https://www.roblox.com/library/4752152697/Leaderboard

You can change the CameraMaxZoomDistance value and CameraMinZoomDistance value lines in the script. Also tell me if it works for you. (I have to go somewhere soon, so sorry if i don’t reply.)