How do I make the camera move with the head without having to change its subject?

I’m trying to make a first person horror game, and I’ve been focusing on the character first. I have added a script to move its head anywhere the camera looks because the flashlight is attached onto it.
The flashlight is welded onto the StarterCharacter, using the ‘Edit Rig’ plugin.
Here’s an example of what it looks like:

And so with the script I’ve learned that the camera is in fact not attached to the head but attached to the humanoid for the body to be able to move with it. I have tried to put the cameras position into the heads position but it wouldn’t let me move the camera. Here’s a little example of what’s happening: https://youtu.be/5w_n8c5OR4Y

And here’s a better video with the head transparent so you can see it better:https://youtu.be/p-6oAbnDpbY

What’s happening with the flashlight is that it’s welded onto to the head, and the camera is in one certain position, so the flashlight looks as if its bugged and not attached to the side of the head.

After this, I used a script that seemed more promising, but lead to even more questions and what seems to have a more complex solution. The script basically switched the cameras subject from the humanoid to the head. When I implemented it the script worked but then I couldn’t rotate the body of my character. Here’s an example: https://youtu.be/0oYOhu_h4k8

I would be truly grateful if someone could help me with this. If you need any other resources let me know!

You can lock the player in first person: Controlling the User’s Camera - create.roblox.com.

I’ve also tried this sorry. It gives me the same result as the third example, I just need the body to rotate with the camera.

1 Like