I'm trying to make a simple seat plane thingy that is controlled with the movement of the mouse. I want it to be turned in whatever direction the mouse is facing, but I cant quite get it to work right. (This is just the base, I'll be making everything better once I get it working the way I want it to)

wait(3)
local start = Vector3.new(0,0,0)
local lookAt = Vector3.new(0,0,0)
local ray = Ray.new(start, (lookAt - start).unit)
local mouse = game.Players.LocalPlayer:GetMouse()
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable

while true do
	wait()
	start = Vector3.new(camera.CFrame)
	lookAt = Vector3.new(mouse.UnitRay.Direction)	
	camera.CFrame = game.Workspace.Seat.CFrame
	game.Workspace.Seat.BodyVelocity.Velocity = mouse.UnitRay.Direction
	game.Workspace.Seat.Rotatione.CFrame = CFrame.new(game.Workspace.Seat.Position, mouse.UnitRay.Direction)
end

2 comments

0

Any errors?

0

No the control is just VERY VERY off