Hello! I’ve been trying to figure out how to find a max range for a Camera FOV, but I have no clue on what I should be trying, I want to make it where there’s a range for only to 70-120 for the camera effect but I end up breaking the camera with out any clue.
The whole coding for it is this.
UserInputService.InputChanged:Connect(function()
if Dragging ~= false and Inside ~= false then
local MousePosition = UserInputService:GetMouseLocation()
local RelatedPosition = MousePosition - Frame.AbsolutePosition
local Percent = RelatedPosition.X / Frame.AbsoluteSize.X
TweenService:Create(Button,TweenInfo.new(1),{Position = UDim2.new(math.clamp(Percent, 0, 1),0 ,0.5 ,0)}):Play()
TweenService:Create(CurrentCamera,TweenInfo.new(1),{FieldOfView = Percent*95}):Play()
for _, CameraText in pairs(Frame:GetChildren()) do
if CameraText:IsA("TextLabel") then
CameraText.Text = CurrentCamera.FieldOfView
end
end
end
end)
This is a slider button, so I’m a bit confused, if there’s any site I should check out or video let me know please, I’ve been trying to figure it out for the past 2 hours trying to make a max range for the Field of View.