sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
|
| 17 Feb 2015 06:56 PM |
I'm trying to make this script in which your scroll up, the FieldOfView will increase until it hits 50. However, when I run the script it goes farther than 50 all the way to 1. Any reason why this is happening?
local Player = game.Players.LocalPlayer local Camera = game.Workspace.CurrentCamera local debounce = false local Min = 50 local Max = 70 local Mouse = Player:GetMouse ()
Mouse.WheelForward:connect (function()
if debounce == true then return end debounce = true
if Camera.FieldOfView == Max then while Camera.FieldOfView ~= Min do Camera.FieldOfView = Camera.FieldOfView - .5 wait () end end
wait ()
debounce = false end) |
|
|
| Report Abuse |
|
|
sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
| |
|
sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
| |
|
sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
| |
|
|
| 17 Feb 2015 07:46 PM |
Try this:
Mouse.WheelForward:connect (function() if debounce then return end debounce = not debounce if Camera.FieldOfView >= Max then for FOV = Camera.FieldOfView,Min,-.5 do Camera.FieldOfView = FOV end end debounce = not debounce end) |
|
|
| Report Abuse |
|
|
sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
| |
|