Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I disable the scroll wheel for a player?

Title pretty much explains it. However, to put into context, I have a script that focuses the CurrentCamera on a part but I don't want the player to be able to use their scroll wheel to zoom in or out. How can I prevent this?

The script looks like this if necessary

local cam = game.Workspace.CurrentCamera
local part = game.Workspace.FocusHere

cam.CameraSubject = part
wait(0.3)
cam.CoordinateFrame = CFrame.new(part.Position + Vector3.new(1,0,1))
cam.CameraType = 'Attach'

1 comment

0

I tried something that sort of worked, but they can hold right click and move the camera around, but they cannot zoom in or out. I changed CameraType to Custom, and went into Players and changed 'CameraMaxZoomDistance' and 'CameraMinZoomDistance' to the same value, meaning they cannot zoom in or out when stuck at that value.

1 answer

Features such as CameraMinZoomDistance and CameraMaxZoomDistance can change the minimum and maximum zoom camera values. If you want to make it static, then compare these 2 properties.

This discussion is preserved as it was. New answers, comments, and votes are closed.