I am currently making a sniper rifle, and the scope GUI is done, however I can’t seem to figure out how to magnify the camera. The issue is, I tried Roblox’s example, (Camera | Roblox Creator Documentation) however it just locked the camera and didn’t allow me to move my camera around.
CURRENT CODE (without roblox example)
local scope = script.Parent
game.Players.LocalPlayer.CameraMode = "LockFirstPerson"
game:GetService("UserInputService").MouseIconEnabled = false
scope.Main.Position = UDim2.new(0.5,-scope.Main.AbsoluteSize.X/2,0,0)
scope.Left.Size = UDim2.new(0,scope.Main.AbsolutePosition.X,1,0)
scope.Right.Size = UDim2.new(0,scope.Main.AbsolutePosition.X,1,0)
scope.Right.Position = UDim2.new(1,-scope.Main.AbsolutePosition.X,0,0)
scope.Changed:Connect(function()
scope.Main.Position = UDim2.new(0.5,-scope.Main.AbsoluteSize.X/2,0,0)
scope.Left.Size = UDim2.new(0,scope.Main.AbsolutePosition.X,1,0)
scope.Right.Size = UDim2.new(0,scope.Main.AbsolutePosition.X,1,0)
scope.Right.Position = UDim2.new(1,-scope.Main.AbsolutePosition.X,0,0)
end)