How to stop scrolling from changing camera distance?

Hello.
So, this issue has been happening since September-October and has still not been fixed.

Is there a solution that stops changing the camera’s distance when scrolling through a frame?

When you have a GUI, you simply set a scrolling frame to active, but in the workspace (surface GUI), it doesn’t work as expected.
It still moves it and it gets very annoying at some point.

Thank you.

2 Likes

You could make a simple script that detects when the players mouse is over the frame, then lock the zooming for the player.

game.Players.PlayerAdded:Connect(function(Player)
local prevMin = 0.5
local prevMax = 400
Frame.MouseEnter:connect(function()
local camDist = (Cam.CoordinateFrame.p - Head.Position).magnitude
prevMin = Player.CameraMinZoomDistance
prevMax = Player.CameraMaxZoomDistance
Player.CameraMinZoomDistance = camDist
Player.CameraMaxZoomDistance = camDist
end)
Frame.MouseLeave:connect(function()
Player.CameraMinZoomDistance = prevMin
Player.CameraMaxZoomDistance = prevMax
end)

Just put that in a script and it should be fine.

Hope this helped what you were looking for.

6 Likes

Wow nice dude I am having same problem as well. Thanks for helping.

2 Likes

No problem, happy to help :smile:

3 Likes

You could just set Active to true (so it acts like a textbutton but you can’t click it).

1 Like

Works only with GUIs …

(30 charssssss)

Okay, so I’m kinda surprised now, but it seems it has been fixed now!