roblox disable camera movement code example
Example 1: how to disable animations roblox
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local ActiveTracks = Humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
v:Stop()
end
Example 2: how to disable camera zooming in roblox
local player = game.Players.LocalPlayer
local currentZoom = (workspace.CurrentCamera.CoordinateFrame.p - player.Character.Head.Position).magnitude (calc. currentzoom)
local LastMaxZoom = player.CameraMaxZoomDistance
local LastMinZoom = player.CameraMinZoomDistance
local isDisabled = false
function ToggleScroll()
if isDisabled then
isDisabled = false
player.CameraMaxZoomDistance = LastMaxZoom
player.CameraMinZoomDistance = LastMinZoom
else
isDisabled = true
player.CameraMaxZoomDistance = currentZoom
player.CameraMinZoomDistance = currentZoom
end
end