I posted an earlier edit of this script about 4 hours ago and I got 1 problem fixed, but now all of a sudden whenever I press literally any button, it just changes my MaxZoom from 8 to 1 and 1 to 8. Tell me if I did something wrong please.
ui=game:GetService('UserInputService')
Player=game:GetService("Players").LocalPlayer
local FirstPerson=''
SN=script.Name
local Sect='PerspectiveChange'
local FirstPerson=''
ui.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.C or Enum.KeyCode.DPadDown then
if FirstPerson==false then
Player.CameraMinZoomDistance=.5
wait(0.03)
Player.CameraMaxZoomDistance=.5
FirstPerson=true
else
Player.CameraMinZoomDistance=8
wait(.03)
Player.CameraMaxZoomDistance=8
FirstPerson=false
end
end
end)
yes, this is a local script in StarterGui and yes, it's the entire script.
y-y-you too... |