Log in to vote

How do i make the camera focus on a certain thing then stop focusing when a player spawns?

Asked by 1 year ago

So i am in development of this horror game called "Friday the 13th: Deep Submersion (W.I.P)" and everything was fine until i have stumbled upon two problems. (I will define the other problem later). Anyways this problem is all about camera manipulation. I am attempting to make the camera focus on a specific part of the area until the player hits the "start" button and the focused part goes away so the player can look around once more. May someone help on this please?

1 answer

Log in to vote
Answered by
FiredDusk 1441
1 year ago

I would do this in a comment but may look confusing. To do this, use camerasubject. So in a localscript, make it so they camera's CameraSubject = A PART

local player = game.Players.LocalPlayer
local cam = workspace.CurrentCamera

cam.CameraSubject = workspace.Part --Find the part

And now make it so when you press the "play" button, it focuses on your character.

repeat wait() until game.Players.LocalPlayer.Character --Adding this for just in case

--find your button and everything you need up here.
--make sure this is in a local script too.
--Also, find the camera and player here

    camera.CameraSubject = player.Character:WaitForChild('Humanoid') --You could make it focus on the Character's head but we will do Humanoid. 

I am at school atm. I am not too sure if this will work, try it on your own,

Alright thank you very much. coolboy90082 -3 — 1y

Answer this question