Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I disable the scroll wheel for a player?

Asked by
Stravan 18
6 years ago

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'

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. DontBlinkDrWho 28 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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.

Ad

Answer this question