Camera Manipulation code not working

I’ve tested the code on other things before and it has worked.
But it is not working in my Proximity Prompt.

Here’s the code:

local Workspace = game:GetService("Workspace")
local CurrentCamera = Workspace.CurrentCamera
local TweenService = game:GetService("TweenService")
local Target = Workspace.REODPART
Prompt = game.Workspace.WaterCanxiety.ProximityPrompt
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local TT = TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0)
local Goal = {CFrame = Workspace.REODPART.CFrame}
local Animation = TweenService:Create(CurrentCamera, TT, Goal)

Prompt.Triggered:Connect(function()
	wait(0.1)
	Animation:Play()
end)

I am not getting any errors either.

Try This.

local Workspace = game:GetService("Workspace")
local CurrentCamera = Workspace.CurrentCamera
local TweenService = game:GetService("TweenService")
local Target = Workspace.REODPART
Prompt = game.Workspace.WaterCanxiety.ProximityPrompt
repeat wait()
	CurrentCamera.CameraType = Enum.CameraType.Scriptable -- Edited Part
until
Enum.CameraType.Scriptable
local TT = TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0)
local Goal = {CFrame = Workspace.REODPART.CFrame}
local Animation = TweenService:Create(CurrentCamera, TT, Goal)

Prompt.Triggered:Connect(function()
	wait(0.1)
	Animation:Play()
end)