The code has worked before but not what I am trying to achieve now, my goal is to reset the camera so the player has their camera back not a set position as I have it.
my code
local TweenService = game:GetService("TweenService")
local runService = game:GetService("RunService")
local Prompt = game.Workspace.signupredirectlol.ProximityPrompt
local CGUI = game.StarterGui.CGUI
local No = game.StarterGui.CGUI.No
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local Animation = TweenService:Create(CurrentCamera, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0, false, 0), {["CFrame"] = workspace.REODPART.CFrame})
TEST = false
Prompt.Triggered:Connect(function(player)
task.wait(0.1)
Prompt.Enabled = false
Animation:Play()
Animation.Completed:Wait()
runService.RenderStepped:Connect(function()
if TEST == false then
CurrentCamera.CFrame = CFrame.new(workspace.REODPART.Position, workspace.FOCUSPART.Position)
end
if TEST == true then
workspace.FOCUSPART:Destroy()
workspace.REODPART:Destroy()
CurrentCamera.CameraSubject = CurrentCamera.CameraSubject.Humanoid
CurrentCamera.CameraType = CurrentCamera.CameraType.EnumType.Fixed
end
No.MouseButton1Click:Connect(function()
TEST = true
end)
end)
end)
A video of the code working but not resetting
don’t mind the background noises, I accidentally left my mic on sorry
After the white clerk’s last line of speech goes, the camera should originate back to the player’s camera.
Not sure why it isn’t working. Any help will be appreciated greatly.