Try using this GetPlayer() function instead in a LocalScript. What this code does is that as well as changing the CameraType and CFrame, it also change the CameraSubject to the part you want the player’s camera to be at.
local function GetPlayer(otherPart)
local Character = otherPart.Parent
local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
if Player == nil then return end
local camera = game.Workspace.CurrentCamera
if camera.CameraType ~= Enum.CameraType.Scriptable then
camera.CameraType = Enum.CameraType.Scriptable
end
camera.CameraSubject = FCamera
camera.CFrame = FCamera.CFrame
end
What I would do would probably create a remote event then fire the remote event to the client who touched the part, then from a local script edit the camera
I would probably look something like this:
-server script
local enterPart = script.Parent
local remoteEvent = -- Path to the remote event
enterPart.Touched:Connect(function(otherPart)
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player then remoteEvent:FireClient(player)
end)
-local script
local remoteEvent = --path to remote event
remoteEvent.OnClientEvent:Connect(function()
local camera = workspace.Camera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = (workspace:FindFirstChild('FCamera') or workspace:WaitForChild('FCamera')).CFrame
end)