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 » Scripting Helpers
Home Search
 

Re: First Person Camera lock

Previous Thread :: Next Thread 
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:18 PM
how would I do this? I want it so when you push "u" you zoom out and can play in third person for 5 seconds

I have

local cam = game.Workspace.Camera
cam.CameraType = "Scriptable"
cam.FieldOfView = 0
player.Mouse.KeyDown:connect(function(key)
if key == "u" then
cam.CameraType = "Scriptable"
cam.FeildOfView = 70
wait(5)
cam.CameraType = "Scriptable"
cam.FeildOfView = 0
end
end)
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:22 PM
[ Content Deleted ]
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
18 Apr 2014 02:24 PM
I was looking for one of these a few weeks ago.


Took me weeks to get a response.


Let me save you some time:


wait()
player = game.Players.LocalPlayer
player.CameraMode = "Classic"
wait()
player.CameraMode = "LockFirstPerson"







Make that a local script and put it in starter GUI
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
18 Apr 2014 02:25 PM
Oh wait I didn't read the thread fully.



ignore what I said.

It probably won't help.



But you could do it so on press of U, then player.CameraMode is free mode


Something like that.


But so far, my post is not helping c;
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:28 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:31 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:32 PM
@neon it spazzes out between in and out I'll try to fix it but I'm not that good >.<
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:34 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:37 PM
No. Just a local script.
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:38 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:40 PM
It is still zoomed in close but not all the way and you can zoom out D:
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:42 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:44 PM
zoomed in close but not all the way D:
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:47 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:48 PM
ERHMAHGURD its SOOOOOOOO close but not there D:
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:48 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 02:52 PM
[ Content Deleted ]
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
18 Apr 2014 02:53 PM
Local script sry for delay
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
18 Apr 2014 02:57 PM
--In a localscript, place this.

local db = false
local Cooled = false
local SomeTime = 5
local CoolDown = 10
local powertool = "Awesome" --This variable is completely optional.
local mse = game.Players.LocalPlayer:GetMouse()
local CamKey = 85

function CAM()
if db == false then db = true
if FPSMode = false then
if Cooled = true then Cooled = false
game.Workspace.CurrentCamera.CameraMode = "Classic"
wait(SomeTime)
game.Workspace.CurrentCamera.CameraMode = "LockFirstPerson"
wait(CoolDown)
Cooled = true
elseif Cooled = false then r
eturn
end
end
end
db = false
end

function PRELOAD()
game.Workspace.CurrentCamera.CameraMode = "LockFirstPerson"
mse.KeyDown:connect(function(key)
if key:byte == CamKey then
CAM()
end
end)
end

repeat wait() until game.Players.LocalPlayer.Character
PRELOAD()
end

--Shira
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
18 Apr 2014 03:02 PM
[ Content Deleted ]
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
18 Apr 2014 03:07 PM
@neon Yay for debounce and cooldown.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
18 Apr 2014 03:08 PM
Plus mine will be ever so slightly less laggy. Yay for connection lines and GetMouse(), anything you're doing with while wait() do can probably be done better some other way, especially from a lag optimization stand point.

--Shira
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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