I'm wondering what script would allow me to lock a player's camera into third or first-person mode. I heard that minzoom and maxzoom weren't working, and I haven't had much luck with it either. It would be helpful to have the camera locked a set distance away from the player though. Any ideas?
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | plr.CharacterAdded:connect( function (char) |
3 | if plr and char then |
4 | plr.CameraMaxZoomDistance = 0.5 |
5 | plr.CameraMinZoomDistance = 0.5 |
6 | end |
7 | end ) |
8 | end ) |
01 | self = script.Parent |
02 | c = workspace.CurrentCamera |
03 |
04 | player = game.Players.LocalPlayer |
05 | char = player.Character or player.CharacterAdded:wait() |
06 | humanoid = char:WaitForChild( "Humanoid" ) |
07 |
08 | -- Apply some properties |
09 |
10 | player.CameraMaxZoomDistance = 0.5 |
11 | c.FieldOfView = 100 -- Things get trippy if we don't do this. |
12 | humanoid.CameraOffset = Vector 3. new( 0 , 0 ,- 0.5 ) |
13 |
14 | function lock(part) |
15 | if part and part:IsA( "BasePart" ) then |