"Position cannot be assigned to"

Still the same result…

It has to be game.Workspace.CurrentCamera as that is the players camera

And like that :

wait(3)
local UIS = game:GetService("UserInputService")
local Body = workspace["DAF XF"].Body
local Camera = workspace.CurrentCamera

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.One then
		Camera.CameraType = Enum.CameraType.Scriptable
		
		while Camera.CameraType == Enum.CameraType.Scriptable do
			wait()
			Camera.CFrame.Position = Vector3.new(Body.Parent.DriveSeat.Position.X, Body.Parent.DriveSeat.Position.Y + 5, Body.Parent.DriveSeat.Position.Z)
		end
	end
end)

Same result


But it gives you a cool effect:

The camera changes when you press button one… Everytime I press button One, it shows the error.

Alright I have the same problem than you so try this :

local UIS = game:GetService("UserInputService")
local Body = workspace["DAF XF"].Body
local Camera = workspace.Camera

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.One then
		Camera.CameraType = Enum.CameraType.Scriptable
		
		while Camera.CameraType == Enum.CameraType.Scriptable do
			wait()
			Camera.CFrame = CFrame.new(Vector3.new(Body.Parent.DriveSeat.Position.X, Body.Parent.DriveSeat.Position.Y + 5, Body.Parent.DriveSeat.Position.Z))
		end
	end
end)
1 Like

Yeah, it works as intended…

1 Like

Also for a better experience you can put task.wait() instead of wait() task.wait() is more faster than wait()

1 Like

Its now very smooth… Thank you for your suggestion!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.