I have a script that runs a transition everytime a player teleports somewhere and when I tween the FOV of the player, it works fine but resets right away as shown in the video below. Whatever I try to change the FOV manually, not even workspace.CurrentCamera.FieldOfView = 1
works.
Here’s the script, the teleport part works fine, the “TweenFOV1” works fine, it’s the “TweenFOV2” that for some reason just won’t do anything.
game.ReplicatedStorage.TeleportEvents.PeteCottage.OnClientEvent:Connect(function()
if db == false then
db = true
local BGTransparency1 = {BackgroundTransparency = 0}
local BGTransparency2 = {BackgroundTransparency = 1}
local TweenTransparency1 = game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5), BGTransparency1)
local TweenTransparency2 = game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5), BGTransparency2)
local TweenFOV1 = game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {FieldOfView = 0})
local TweenFOV2 = game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {FieldOfView = 70})
TweenTransparency1:Play()
TweenFOV1:Play()
game.Workspace.Sound.SoundEffects.GUI.Swoosh:Play()
script.Parent.Zone.Text = "Pete's Cottage"
wait(0.5)
script.Parent.LoadingCircle:TweenPosition(UDim2.new(0.5, 0,0.82, 0), "Out", "Quint", 0.75)
wait(0.05)
script.Parent.Bar:TweenPosition(UDim2.new(0.5, 0,0.88, 0), "Out", "Quint", 0.75)
wait(0.05)
script.Parent.TeleportingTo:TweenPosition(UDim2.new(0.5, 0,0.92, 0), "Out", "Quint", 0.75)
wait(0.05)
script.Parent.Zone:TweenPosition(UDim2.new(0.5, 0,0.955, 0), "Out", "Quint", 0.75)
wait(0.05)
wait(math.random(2, 5))
game.Players.LocalPlayer.PlayerGui.Misc.TeleporterBackground.Visible = false
game.Players.LocalPlayer.Character:MoveTo(game.Workspace.MapObjects.Forest.Misc.PeteTeleportPart.Position)
script.Parent.Zone:TweenPosition(UDim2.new(0.5, 0, 1.955, 0), "In", "Quint", 0.75)
wait(0.05)
script.Parent.TeleportingTo:TweenPosition(UDim2.new(0.5, 0, 1.92, 0), "In", "Quint", 0.75)
wait(0.05)
script.Parent.Bar:TweenPosition(UDim2.new(0.5, 0, 1.88, 0), "In", "Quint", 0.75)
wait(0.05)
script.Parent.LoadingCircle:TweenPosition(UDim2.new(0.5, 0, 1.82, 0), "In", "Quint", 0.75)
wait(0.05)
wait(0.5)
TweenTransparency2:Play()
TweenFOV2:Play()
wait(0.5)
db = false
end
end)