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: Not locking into first person mode

Previous Thread :: Next Thread 
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 01:17 PM
here's the code(all in localscript):

local camModel = workspace.CamModel--[[contains a part called "HumanoidRootPart", "Head" and it also contains a Humanoid object]]

workspace.CurrentCamera.CameraSubject = camModel.Humanoid
game.Players.LocalPlayer.CameraMode = 1

this doesn't seem to actually go into first person, why?
-Thanks!
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 01:30 PM
bump
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
11 Jun 2014 01:31 PM
Easiest way to first person anyone:

--
player.CameraMode="LockFirstPerson"
--
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 01:35 PM
That's not going to work for what I am doing. I am working on a 3rd person game, and this is basically the only work around that I could come up with. Really, did you even read the code I posted?
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
11 Jun 2014 01:38 PM
>Really, did you even read the code I posted?

You didn't say "third person camera".
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 01:39 PM
Oh. It appears I didn't. Sorry, I thought I mentioned that. Now is it possible to do this, or not?
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
11 Jun 2014 01:41 PM
Your title was "Not locking into first person mode", and you tried a more complicated way of doing it. Now you're saying it's a 3rd person game?

No idea what you're talking about. Just use the line I gave you and then change the camera back to custom when you're done having the player 1st person.

Unless you want to lock the camera into first person aiming at an object or something? explain pls :o
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 01:50 PM
Okay, I will explain more. I am trying to replicate the camera from a game called "Strobe" if that helps any. What I am doing is creating a new model(this can be refered to as camModel) that's welded to the players head at some offset. By changing the camera subject to the humanoid inside camModel, I can offset the camera to be relative to the players head(also note that the players head angles up or down depending on where the camera is pointing). My first solution was to use the CameraOffset property of the humanoid, however that produced choppy camera movements.
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
11 Jun 2014 02:15 PM
bump[2]
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