Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make this FPS script show my player's body?

Asked by 10 years ago

I have the FPS script right here.

local player = game.Players.LocalPlayer

player.CameraMode = Enum.CameraMode.Classic
wait(10)
player.CameraMode = Enum.CameraMode.LockFirstPerson

-- since player was already defined i removed it.

player.CameraMode = Enum.CameraMode.Classic
wait(7)
player.CameraMode = Enum.CameraMode.LockFirstPerson

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Torso')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Left Leg')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Left Arm')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Right Leg')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Right Arm')

Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom

--for 3rd person view:
Workspace.CurrentCamera.FieldOfView = 8



But I want to see the player's body while in FPS mode, because I'm making a Dying Light game and I want it to be as realistic as possible.

0
You could fix the camera to look at a different body part. Aethex 256 — 10y
0
Yeah but How? Can you give me an example? 789zaya 0 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago
Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('(Put here your part name)')

Updated by what question'er asked:

local player = game.Players.LocalPlayer

player.CameraMode = Enum.CameraMode.Classic
wait(10)
player.CameraMode = Enum.CameraMode.LockFirstPerson

-- since player was already defined i removed it.

player.CameraMode = Enum.CameraMode.Classic
wait(7)
player.CameraMode = Enum.CameraMode.LockFirstPerson

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Torso') -- you didn't need to put the () i just used that so you would know that was a info! XD

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Left Leg')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Left Arm')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Right Leg')

Workspace.CurrentCamera.CameraSubject = player.Character:findFirstChild('Right Arm')

Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom

--for 3rd person view:
Workspace.CurrentCamera.FieldOfView = 8 -- Hope this helps

If it doesn't work tell output. Ty! Hope this helps!!! ~marcoantoniosantos3

0
Thanks! But what if I want more than 1 part name there? and please copy and paste my script into this one so I know where to put it? I'm a newbie at scripting. 789zaya 0 — 10y
0
And where do I put this script? I'm a newbie I needs tah know! 789zaya 0 — 10y
0
make this a localscript in StarterGui, and i guess theres no way to put it see inside two parts at each time (separate camera maybe???) anyway, i updated my post. Remember to make this as correct answer if it works ;3 marcoantoniosantos3 200 — 10y
0
It doesn't after 7 or 10 secs it put it in a different camera mode, I even tried gtting rid of the bottom part of the script. But it's not working. 789zaya 0 — 10y
View all comments (3 more)
0
Yeah.. It doesn't work. But thanks for the help. 789zaya 0 — 10y
0
Oh yeah, the output says this in the red: player.CameraMode :3: attempt to index local 'player' (a nil value) 789zaya 0 — 10y
0
Make sure it's a localscript and also add a wait(1) at line 0/1 marcoantoniosantos3 200 — 10y
Ad

Answer this question