Simplest way to make lock on?

im making a game and im planning this mechanic where the players camera “locks on” to another player. its togglable and the idea is the camera stays with the original player, and focuses on the object it locks onto.

With that being said, im not exactly sure where to start. How would i achieve this?

help is appriechiated, thank you for your time

1 Like

Hey, a lot of people have asked this question before. A simple google search will pull up:

I suggest reading through those articles, looking at their code, and modifying it to your liking. It should provide a good place to start.

2 Likes

The second one goes through unnecessary steps, literally all you need is: workspace.CurrentCamera.CFrame = CFrame.new(Player1.HumanoidRootPart.Position,Player2.HumanoidRootPart.Position)

Of course you’re gonna have to edit it a little bit to make it more tolerable, but that’s way easier than the second Tutorial.

There is actually a great resource created and provided by @epictitanic6g, although it may be more advanced.
You can take a look at the source code of the resource to learn how it works!
The link to the un-copylocked resource should be found in the following forum:

4 Likes

That’s besides the point I was making :confused:

There are resources available on the internet to help, it is best to check them before making a post.

2 Likes