Hello, for the camera, you can tween it. Which is like animation but not keyframes. The camera has a CFrame, which stores it’s position and orientation.
You can tween the camera CFrame to another CFrame like a part’s CFrame, which will give the camera the part’s position and orientation over time, like 1s or 5s.
To make a Tween, first you need the TweenService, the TweenService let’s you create tweens that can the be played. Game:GetService(“TweenSevice”).
You store it in a local variable, for example,
Local tweenService = Game:GetService(“TweenSevice”)
TweenService has a function :Create(), this lets you make tweens. This function takes some parameters,
1). The instance you want to tween.(which is your camera)
2).Info about the tween, like how long it takes(in seconds), there’s other info but get used the time parameter first.
You need a TweenInfo instance for this. Store it in another variable.
Local tweenInfo = TweenInfo.New(1)
3).What properties of the instance you want to tween, like size, Color or your case CFrame. You can also make a table if you want. This parameter expects table.
Make another local variable, this one will store the tween which you can use :play() on. Put in all parameters for the Create() function.
Local myTween = tweenService:Create(Camera, tweenInfo, {CFrame = part.CFrame})
Then you can play this tween and it will move your camera to the part in 1 second. Make sure to reference the part in a variable and also move it to where you want your camera.
myTween:Play()
Make sure to use local script when tweening camera’s because camera is client-side. Reference the camera in local script with workspace.currentCamera
You can then choose when to play this, like when a part is touched.
Give that part a server script and detect when it’s touched, part.touched, then use a remote event to fire to the client that touched the part. Then listen for that remote event in local script and play that tween.
Part.touched is an event predefined by Roblox, a remote event is an event defined by you, you choose when to raise an event and that’s when a part is touched.
I hope you understand what I wrote, it’s a bit rushed. I wish you the best.