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: How to lock first person.

Previous Thread :: Next Thread 
cheated is not online. cheated
Joined: 09 Nov 2010
Total Posts: 7073
06 May 2013 09:53 PM
[ Content Deleted ]
Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
06 May 2013 09:56 PM
If I remember correctly, it is a property of Local Player. I can not remember exactly what it is, but I do know it is there. With that information, you should be able to do something.
Report Abuse
cheated is not online. cheated
Joined: 09 Nov 2010
Total Posts: 7073
06 May 2013 09:59 PM
[ Content Deleted ]
Report Abuse
Captevyo is not online. Captevyo
Joined: 09 Nov 2009
Total Posts: 179
06 May 2013 10:15 PM
Make a repeat with humanoid so when the script is notified the humanoid is 0 it resets the first person after a certain wait.
Report Abuse
sordx is not online. sordx
Joined: 14 Jan 2011
Total Posts: 215
07 May 2013 04:16 AM
Try a gui that says Zoom in too play
Report Abuse
Robloxianpilotknight is not online. Robloxianpilotknight
Joined: 29 Dec 2009
Total Posts: 7739
07 May 2013 06:45 AM
By my guess, you use the Player Added connection to players. You also need to have it so when they respawn, the script runs then, not just add them to the game.
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
07 May 2013 07:12 AM
plr = game.Players.LocalPlayer

plr.CameraMode = "LockFirstPerson"

function lolCharacter()
workspace.ChildAdded:connect(function(obj)
if plr:GetPlayerFromCharacter(obj) then
return true
end
end)
end

while wait() do
if lolCharacter() then
plr.CameraMode = "LockFirstPerson"
end
end

-- idk
Report Abuse
777MrEpic is not online. 777MrEpic
Joined: 17 Oct 2012
Total Posts: 3998
07 May 2013 07:12 AM
Do a loop.
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
07 May 2013 07:24 AM
@getkoed

That is so much inefficiency.

Heres a simple way of doing it:

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
player.CameraMode = Enum.CameraMode.LockFirstPerson
end)
end)
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
07 May 2013 03:18 PM
I completely forgot about CharacterAdded. Probably because I didn't have my daily portion of coffee yet.

Also, I'd say

player.CameraMode = "LockFirstPerson"

instead of

player.CameraMode = Enum.CameraMode.LockFirstPerson

It's shorter. :c
Report Abuse
nate979o is not online. nate979o
Joined: 14 Mar 2011
Total Posts: 1284
07 May 2013 04:31 PM
:3
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