title was a lie, dont think this is actually scrolling, but i have the camera setup so its top down and was wondering how i would move it with holding rightclick or something
heres the code i got currently
-- Variables
local RunService = game:GetService("RunService")
local uis = game:GetService('UserInputService')
local Ts = game:GetService("TweenService")
local player = game:GetService("Players").LocalPlayer
local camera = game.Workspace.CurrentCamera
local mouse = player:GetMouse()
local View = 25
local LastView = nil
-- Main
wait(3)
camera.CameraType = Enum.CameraType.Scriptable
mouse.WheelForward:Connect(function()
View = math.clamp((View - 4), 10, 50)
end)
mouse.WheelBackward:Connect(function()
View = math.clamp((View + 4), 10, 50)
end)
RunService.Heartbeat:Connect(function()
--camera.CFrame = CFrame.new(CFrame.new(0,0,0).Position + Vector3.new(0,math.clamp(View,10,50),0))
--camera.CFrame *= CFrame.Angles(math.rad(-90),0,0)
if View ~= LastView then
Ts:Create(camera, TweenInfo.new(.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{
CFrame = CFrame.new(CFrame.new(0,0,0).Position + Vector3.new(0,math.clamp(View,10,50),0), Vector3.new(0,0,0))}):Play()
LastView = View
end
end)
