Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How do i make a toggleable (Is that even a word?) scope

Asked by 10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I do not know any scripts at all if you could possibly answer me with a script that will toggle the scope by pressing Q

0
i dont mean to be annoying but can you write down the coomplete script? BraInKilLeR24 0 — 10y

3 answers

Log in to vote
1
Answered by 10 years ago

You need to make a local script and put it in the weapon. Connect a function to the keypress event that, if the key is "Q", sets the CurrentCamera.FieldOfView to 20. If the FieldOfView is already 20, though, set it to 70.

Ad
Log in to vote
0
Answered by 10 years ago

The best way is KeyDown.

Like this (This is to just give you a hand)

if key == "q" do

So if you hit the key, Q, it'll make it scope. That is just one part though.

Log in to vote
0
Answered by 10 years ago
Camera.CameraType = "Scriptable"
script.Parent.KeyDown:connect(function(key)
if key == "Q" do
Camera.FieldOfView =     -- Number here.

Answer this question