Spectrial
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 3348 |
|
|
| 19 Aug 2012 12:18 PM |
local deb = false local looking = false
function Key(key) if key then key = string.lower(key) if (key=="q") then local hit = mouse.Target local cam = game.Workspace.CurrentCamera if hit~=nil then if not looking then game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson cam.CameraType = "Custom" cam.FieldOfView = 60 wait(0.05) cam.FieldOfView = 50 wait(0.05) cam.FieldOfView = 40 wait(0.05) cam.FieldOfView = 30 wait(0.05) cam.FieldOfView = 20 cam.CameraSubject = nil cam.Focus = CFrame.new(mouse.Hit.p) deb = true looking = true wait(3) deb = false return else game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.Classic cam.CameraType = "Custom" cam.CameraSubject= game.Players.LocalPlayer.Character.Humanoid deb = true cam.FieldOfView = 20 wait(0.01) cam.FieldOfView = 30 wait(0.01) cam.FieldOfView = 40 wait(0.01) cam.FieldOfView = 50 wait(0.01) cam.FieldOfView = 60 wait(0.01) cam.FieldOfView = 70 SetCursor(mouse) looking = false wait(3) deb = false return end end end end end
function Equip(mouse) mouse.KeyDown:connect(Key) end
script.Parent.Equipped:connect(onEquipped)
I tried to change it from RMB to the key Q and it says event disconnected becuause of exception... Any help... anyone? |
|
|
| Report Abuse |
|
Spectrial
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 3348 |
|
| |