generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help w/ this small script.

Previous Thread :: Next Thread 
sebsa is not online. 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 is not online. sebsa
Joined: 17 Oct 2008
Total Posts: 2771
17 Feb 2015 07:03 PM
1
Report Abuse
sebsa is not online. sebsa
Joined: 17 Oct 2008
Total Posts: 2771
17 Feb 2015 07:06 PM
2
Report Abuse
sebsa is not online. sebsa
Joined: 17 Oct 2008
Total Posts: 2771
17 Feb 2015 07:11 PM
Can any of you help me?
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
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 is not online. sebsa
Joined: 17 Oct 2008
Total Posts: 2771
17 Feb 2015 07:51 PM
Thank you so much!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image