I was coding a little 3 second custscene when I noticed that if I moved a mouse, the fov was back to normal, and yes it was through a tween though I dont have a tween that moves the camera to that fov, here is the clip: video
Also the script is down below:
local camPart = workspace:WaitForChild("CamPart")
local RunService = game:GetService("RunService")
local rep = game:GetService("ReplicatedStorage")
local events = rep:WaitForChild("Events")
local UIS = game:GetService("UserInputService")
local lighting = game:GetService("Lighting")
local blur = lighting:WaitForChild("UIBlur")
local cam = workspace.CurrentCamera
local MAX_TILT = 10
local cheeseEvent = events:WaitForChild("Cheese")
local gameStartEvent = events:WaitForChild("GameStart")
local gameEndEvent = events:WaitForChild("GameEnd")
local ts = game:GetService("TweenService")
local hoverInfo = TweenInfo.new(0.5,Enum.EasingStyle.Quint)
local gui = script.Parent
local PlayButton = gui:WaitForChild("Play")
local SettingsButton = gui:WaitForChild("Settings")
local logo = gui:WaitForChild("Logo")
local pickMode = gui:WaitForChild("PickGamemode")
local ezButton = pickMode:WaitForChild("Easy")
local hdButton = pickMode:WaitForChild("Hard")
local backbutton = pickMode:WaitForChild("Back")
local moreButton = pickMode:WaitForChild("More")
local inGame = gui:WaitForChild("InGame")
local cheeseAmmountTL = inGame:WaitForChild("CheeseAmmount")
local MoreGamemodes = gui:WaitForChild("MoreGamemodes")
local MGbackButton = MoreGamemodes:WaitForChild("Back")
local InsaneButton = MoreGamemodes:WaitForChild("Insane")
local NightmareButton = MoreGamemodes:WaitForChild("Nightmare")
local unfairButton = MoreGamemodes:WaitForChild("Unfair")
local mode = "Menu"
local gminus1 = {
FieldOfView = 115
}
local g0 = {
FieldOfView = 120
}
local g1 = { --Big
Position = UDim2.fromScale(0.5,0.478),
Size = UDim2.fromScale(0.224,0.166)
}
local g2 = { --normal
Position = UDim2.fromScale(0.5,0.495),
Size = UDim2.fromScale(0.206,0.143)
}
local g3 = { --Big
Position = UDim2.fromScale(0.5,0.665),
Size = UDim2.fromScale(0.224,0.16)
}
local g4 = { --normal
Position = UDim2.fromScale(0.5,0.677),
Size = UDim2.fromScale(0.206,0.143)
}
local g5 = { --green
BackgroundColor3 = Color3.fromRGB(96, 255, 85)
}
local g6 = { --red
BackgroundColor3 = Color3.fromRGB(255, 47, 47)
}
local g7 = { --red
BackgroundColor3 = Color3.fromRGB(255, 217, 26)
}
local g8 = { --Big
Position = UDim2.fromScale(0.125,0.822),
Size = UDim2.fromScale(0.22,0.15)
}
local g9 = { --normal
Position = UDim2.fromScale(0.125,0.833),
Size = UDim2.fromScale(0.193,0.129)
}
local g10 = { --Big
Position = UDim2.fromScale(0.5,0.887),
Size = UDim2.fromScale(0.171,0.101)
}
local g11 = { --normal
Position = UDim2.fromScale(0.5,0.897),
Size = UDim2.fromScale(0.157,0.086)
}
local g12 = { --Big
Size = UDim2.fromScale(0.22,0.16)
}
local g13 = { --Normal
Size = UDim2.fromScale(0.206,0.143),
BackgroundColor3 = Color3.fromRGB(255, 217, 26)
}
local g14 = { --color
BackgroundColor3 = Color3.fromRGB(247, 0, 255)
}
local g15 = { --color
BackgroundColor3 = Color3.fromRGB(48, 0, 0)
}
local g16 = { --color
BackgroundColor3 = Color3.fromRGB(0, 4, 255)
}
local tminus1 = ts:Create(cam,hoverInfo,gminus1)
local t0 = ts:Create(cam,hoverInfo,g0)
local t1 = ts:Create(PlayButton,hoverInfo,g1)
local t2 = ts:Create(PlayButton,hoverInfo,g2)
local t3 = ts:Create(SettingsButton,hoverInfo,g3)
local t4 = ts:Create(SettingsButton,hoverInfo,g4)
local t5 = ts:Create(ezButton,hoverInfo,g1)
local t6 = ts:Create(ezButton,hoverInfo,g2)
local t7 = ts:Create(hdButton,hoverInfo,g3)
local t8 = ts:Create(hdButton,hoverInfo,g4)
local t9 = ts:Create(ezButton,hoverInfo,g5)
local t10 = ts:Create(ezButton,hoverInfo,g7)
local t11 = ts:Create(hdButton,hoverInfo,g6)
local t12 = ts:Create(hdButton,hoverInfo,g7)
local t13 = ts:Create(backbutton,hoverInfo,g8)
local t14 = ts:Create(backbutton,hoverInfo,g9)
local t15 = ts:Create(moreButton,hoverInfo,g10)
local t16 = ts:Create(moreButton,hoverInfo,g11)
local t17 = ts:Create(MGbackButton,hoverInfo,g8)
local t18 = ts:Create(MGbackButton,hoverInfo,g9)
local t19 = ts:Create(InsaneButton,hoverInfo,g12)
local t20 = ts:Create(InsaneButton,hoverInfo,g13)
local t21 = ts:Create(NightmareButton,hoverInfo,g12)
local t22 = ts:Create(NightmareButton,hoverInfo,g13)
local t23 = ts:Create(unfairButton,hoverInfo,g12)
local t24 = ts:Create(unfairButton,hoverInfo,g13)
local t25 = ts:Create(InsaneButton,hoverInfo,g14)
local t26 = ts:Create(NightmareButton,hoverInfo,g15)
local t27 = ts:Create(unfairButton,hoverInfo,g16)
gui.Enabled = true
blur.Size = 24
RunService:BindToRenderStep("MenuCamera", Enum.RenderPriority.Camera.Value +1, function(deltaTime)
if mode == "Menu" then
local mousePos = UIS:GetMouseLocation()
cam.CFrame = camPart.CFrame * CFrame.Angles(
math.rad(((mousePos.Y - cam.ViewportSize.Y/2) / cam.ViewportSize.Y) * -MAX_TILT),
math.rad(((mousePos.X - cam.ViewportSize.X/2) / cam.ViewportSize.X) * -MAX_TILT),
0
)
end
end)
local function mainMenu()
mode = "Menu"
for _,v in gui:GetDescendants() do
if v:IsA("TextButton") then
v.Active = true
end
end
cam.CameraType = Enum.CameraType.Scriptable
cam.FieldOfView = 120
blur.Size = 24
PlayButton.Visible = true
SettingsButton.Visible = true
logo.Visible = true
ezButton.Visible = false
hdButton.Visible = false
pickMode.Heading.Visible = false
backbutton.Visible = false
cheeseAmmountTL.Visible = false
inGame.CheesePic.Visible = false
moreButton.Visible = false
MGbackButton.Visible = false
InsaneButton.Visible = false
NightmareButton.Visible = false
unfairButton.Visible = false
MoreGamemodes.Heading.Visible = false
end
local function pickGamemode()
PlayButton.Visible = false
SettingsButton.Visible = false
logo.Visible = false
pickMode.Heading.Visible = true
ezButton.Visible = true
hdButton.Visible = true
backbutton.Visible = true
moreButton.Visible = true
MGbackButton.Visible = false
InsaneButton.Visible = false
NightmareButton.Visible = false
unfairButton.Visible = false
MoreGamemodes.Heading.Visible = false
end
local function more()
PlayButton.Visible = false
SettingsButton.Visible = false
logo.Visible = false
ezButton.Visible = false
hdButton.Visible = false
pickMode.Heading.Visible = false
backbutton.Visible = false
moreButton.Visible = false
inGame.CheesePic.Visible = false
moreButton.Visible = false
MGbackButton.Visible = true
InsaneButton.Visible = true
NightmareButton.Visible = true
unfairButton.Visible = true
MoreGamemodes.Heading.Visible = true
end
local function gameUI()
mode = "Game"
for _,v in gui:GetDescendants() do
if v:IsA("TextButton") then
v.Active = false
end
end
cam.CameraType = Enum.CameraType.Custom
cam.FieldOfView = 90
blur.Size = 0
PlayButton.Visible = false
SettingsButton.Visible = false
logo.Visible = false
ezButton.Visible = false
hdButton.Visible = false
pickMode.Heading.Visible = false
backbutton.Visible = false
moreButton.Visible = false
cheeseAmmountTL.Visible = true
inGame.CheesePic.Visible = true
InsaneButton.Visible = false
NightmareButton.Visible = false
unfairButton.Visible = false
MoreGamemodes.Heading.Visible = false
MGbackButton.Visible = false
end
mainMenu()
PlayButton.MouseButton1Click:Connect(function()
pickGamemode()
end)
backbutton.MouseButton1Click:Connect(function()
mainMenu()
end)
moreButton.MouseButton1Click:Connect(function()
more()
end)
cheeseEvent.OnClientEvent:Connect(function(cheeseIhave, totalAmountofcheese)
cheeseAmmountTL.Text = "Cheese: "..cheeseIhave.."/"..totalAmountofcheese
end)
gameEndEvent.OnClientEvent:Connect(function(winOrLost)
mainMenu()
end)
ezButton.MouseButton1Click:Connect(function()
gameUI()
gui.ResetOnSpawn = false
gameStartEvent:FireServer("Easy")
end)
hdButton.MouseButton1Click:Connect(function()
gameUI()
gui.ResetOnSpawn = false
gameStartEvent:FireServer("Hard")
end)
InsaneButton.MouseButton1Click:Connect(function()
gameUI()
gui.ResetOnSpawn = false
gameStartEvent:FireServer("Insane")
end)
NightmareButton.MouseButton1Click:Connect(function()
gameUI()
gui.ResetOnSpawn = false
gameStartEvent:FireServer("Nightmare")
end)
unfairButton.MouseButton1Click:Connect(function()
--cutscene first
gameUI()
cheeseAmmountTL.Visible = false
inGame.CheesePic.Visible = false
cam.CameraType = Enum.CameraType.Scriptable
cam.FieldOfView = 50
local cutsceneFold = rep.Cutscene
cutsceneFold.Parent = workspace
cam.CFrame = cutsceneFold.cutsceneCamPart.CFrame
wait(3)
camPart = workspace:WaitForChild("CamPart")
cutsceneFold.Parent = rep
--game start
gameUI()
gui.ResetOnSpawn = false
gameStartEvent:FireServer("Unfair")
end)
MGbackButton.MouseButton1Click:Connect(function()
pickGamemode()
end)
--Hover animations
PlayButton.MouseEnter:Connect(function()
t1:Play()
tminus1:Play()
end)
PlayButton.MouseLeave:Connect(function()
t2:Play()
t0:Play()
end)
SettingsButton.MouseEnter:Connect(function()
t3:Play()
tminus1:Play()
end)
SettingsButton.MouseLeave:Connect(function()
t4:Play()
t0:Play()
end)
ezButton.MouseEnter:Connect(function()
t5:Play()
t9:Play()
tminus1:Play()
end)
ezButton.MouseLeave:Connect(function()
t6:Play()
t10:Play()
t0:Play()
end)
hdButton.MouseEnter:Connect(function()
t7:Play()
t11:Play()
tminus1:Play()
end)
hdButton.MouseLeave:Connect(function()
t8:Play()
t12:Play()
t0:Play()
end)
backbutton.MouseEnter:Connect(function()
t13:Play()
tminus1:Play()
end)
backbutton.MouseLeave:Connect(function()
t14:Play()
t0:Play()
end)
moreButton.MouseEnter:Connect(function()
t15:Play()
tminus1:Play()
end)
moreButton.MouseLeave:Connect(function()
t16:Play()
t0:Play()
end)
MGbackButton.MouseEnter:Connect(function()
t17:Play()
tminus1:Play()
end)
MGbackButton.MouseLeave:Connect(function()
t18:Play()
t0:Play()
end)
InsaneButton.MouseEnter:Connect(function()
t19:Play()
t25:Play()
tminus1:Play()
end)
InsaneButton.MouseLeave:Connect(function()
t20:Play()
t0:Play()
end)
NightmareButton.MouseEnter:Connect(function()
t21:Play()
t26:Play()
tminus1:Play()
end)
NightmareButton.MouseLeave:Connect(function()
t22:Play()
t0:Play()
end)
unfairButton.MouseEnter:Connect(function()
t23:Play()
t27:Play()
tminus1:Play()
end)
unfairButton.MouseLeave:Connect(function()
t24:Play()
t0:Play()
end)