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

How do you get the camera to focus like a lock-on?

Asked by 7 years ago

I've spent the last couple of days pondering over this, I've used what I can find on the Wiki and the best I can get is a basic focus, however I am trying to get a smooth lock on like you would see in a fighting game. Any help would be very appreciated.

0
This is how my current one operates: https://gyazo.com/52bd495749a949034a6fb5694ca9775c Sarenheart00 16 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

You dont need to set a part to that. I'm assuming your game isn't FE so you can use this

local player = game.Players:FindFirstChild'PLAYERNAME'
if player and player.Character then --we need the character
    workspace.CurrentCamera.CameraSubject = player.Character
end

You dont have to set the camera onto a part, you can simply set the CameraSubject to the person you want to spectate.

Hope this helped!

Ad

Answer this question