Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How To Lock On Camera when Tab is pressed and targeting on a humanoid?

Can someone please tell me how to Lock On Camera when Tab is pressed and targeting on a humanoid?

Thanks!

2 comments

1

First: This is not a request site. We only correct errors you made, not the wole thing. Second: you should give more details

1

You basically just beg. Not even try

1 answer

✓ Accepted answer

Just like @WoTrox said, you cannot get something for free, and this isn't a request site. Well, I can help you give ideas on how you can make one.

So, you want to lock camera on a specific humanoid, when Tab is pressed on the keyboard. Here's some articles related to what you want. The service, that will be used is called UserInputService. Here's an article on example of UserInputService. And there's a part of it which is called InputBegan. It will help to detect whether Tab key is pressed on the keyboard.

Now, for the locking camera to the humanoid. Well, there's a property of Camera, which is called CameraSubject. CameraSubject is the humanoid that the Camera is following. By default, CameraSubject is LocalPlayer, but you can change it by the examples given in the link.

MAKE SURE : You do all the above in a Local script as they won't work in Server script.

If you have any doubts, just comment and I'll try to help!

Lemme know if it helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.