“Position cannot be assigned to” pops out, when I try to change position of player′s camera…
local UIS = game:GetService("UserInputService")
local Body = game.Workspace["DAF XF"].Body
local cam = workspace.Camera
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.One then
cam.CameraType = Enum.CameraType.Custom
while cam.CameraType == Enum.CameraType.Custom do
wait()
cam.CFrame.Position = Vector3.new(Body.Parent.DriveSeat.Position.X, Body.Parent.DriveSeat.Position.Y+5, Body.Parent.DriveSeat.Position.Z)
end
end
end)
local UIS = game:GetService("UserInputService")
local Body = game.Workspace["DAF XF"].Body
local cam = workspace.CurrentCamera
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.One then
cam.CameraType = Enum.CameraType.Custom
while cam.CameraType == Enum.CameraType.Custom do
wait()
cam.CFrame = CFrame.new(Vector3.new(Body.Parent.DriveSeat.Position.X, Body.Parent.DriveSeat.Position.Y+5, Body.Parent.DriveSeat.Position.Z)) * cam.CFrame.Rotation
end
end
end)