How would I make it so that when a player touches a brick, their camera focuses in on (tweens to) an NPC? Although when they are no longer touching the brick, their camera resumes to its normal state...?
COMMUNITY QUESTION
How to tween the camera in as a result of touching a brick?
1 answer
You can use the "Touched" event that is an event of every part in the game that fires when another part touches said part. With the event, you can connect a function to it that sets the Camera property to scriptable and uses the Lerp function to animate the camera.
Helpful resources:
https://developer.roblox.com/api-reference/event/BasePart/Touched - The Touched event
https://developer.roblox.com/articles/Lerp - The Lerp function
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Use this https://www.youtube.com/watch?v=ZZdZDcYIxCg but make sure you change the script to an On Touched event!