So when you move your mouse it moves the camera.
And I need it to keep that when it switches to credits when it does
Can anyone help please?
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local MOVE_SPEED = 200
local LocalPlayer = Players.LocalPlayer
local CurrentCamera = workspace.CurrentCamera
local CameraPart1 = workspace:WaitForChild("CameraPart1")
local CameraPart2 = workspace:WaitForChild("CameraPart2")
local Credits = workspace:WaitForChild("Union"):WaitForChild("Menu"):WaitForChild("CreditsButton"):WaitForChild("Credits")
local fade = game.StarterGui.LoadingScript.LoadingScreen:WaitForChild("Fade")
local Mouse = LocalPlayer:GetMouse()
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local function UpdateCamera()
local Center = CameraPart1.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart1.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0)
end
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
Its a script with RunContext set to Client