local ccamera = workspace.CurrentCamera
local ts = game:GetService("TweenService")
ccamera.CameraType = "Custom"
local part = path_to_part
local Tween = ts:Create(ccamera,TweenInfo.new(5),{["CFrame"]=part.CFrame}):Play()
ccamera.CameraSubject = part
I tried setting the camera subject but I’m not sure what I’m doing wrong.
Here’s my code:
local LocalPlayer = game.Players.LocalPlayer
local Character = LocalPlayer.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera
function onSeated(isSeated, seat)
if isSeated then
print(seat.Name)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = seat.CamPart
end
end
Humanoid.Seated:Connect(onSeated)
I’m not getting errors in the output and the seat name is printing, also as you can see in the video Its changing the camera but the camera is not attaching to the cam part for some reason.
I think it’s because you’re changing the camera type.
When in scriptable the default system completely turns off, so that you can create your own custom camera controller.