Currently, I am working on making the main menu for a Roblox game that I am trying to develop (It is my first game, which I am using as a practice to learn lua). However, I am having problems with camera manipulation, using youtube tutorials and other questions on this site I managed to make a menu with a single camera angle. I want to change that so about every 60 seconds it switches to a different camera, which is at a different angle and position. Every time the camera changes I also want to make it so that certain lighting values change as well. If anyone can help me with this, that would be very much appreciated and I would be very thankful.
local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local Mouse = player:GetMouse()
local camera = game.Workspace.CurrentCamera
if script.Parent.Parent == game.Players.LocalPlayer:WaitForChild("PlayerGui") then
game.Workspace.MenuMusic:Play()
end
local defaultCframe = camera.CFrame
local view = 150
--local blur = game.Lighting.Blur
local DOF = game.Lighting.DepthOfField
local ColorCorrection = game.Lighting.ColorCorrection
local SunRays = game.Lighting.SunRays
DOF.FarIntensity = 0.5
DOF.FocusDistance = 12
DOF.InFocusRadius = 10
DOF.NearIntensity = 0
ColorCorrection.Contrast = 0.4
ColorCorrection.Saturation = 0.5
SunRays.Intensity = 0.3
function updateCamera()
camera.CFrame = game.Workspace.MenuCamera1.CFrame
end
game:GetService("RunService").RenderStepped:Connect(updateCamera)
script.Parent.Frame.Play.MouseButton1Click:Connect(function()
wait(0.2)
if player.Team ~= game.Teams.Selecting then
--blur.Size = 0
DOF.FarIntensity = 0
DOF.FocusDistance = 0
DOF.InFocusRadius = 0
DOF.NearIntensity = 0
ColorCorrection.Contrast = 0
ColorCorrection.Saturation = 0
game.Workspace.MenuMusic:Stop()
camera.CameraType = Enum.CameraType.Custom
script.Parent.Frame:Destroy()
game.ReplicatedStorage.Respawn:FireServer()
end
end)

2 comments
This code probably works, but I am a bit dull.. How would I go about using this..?
wait, it's you lmao, from the blur thing